Skip to content

Commit

Permalink
Massive improvements in exploration and hunting AI, also telefrags!
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Rehermann (Gustavo6046) committed May 9, 2019
1 parent d88194b commit 19ecdbf
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 115 deletions.
1 change: 1 addition & 0 deletions CVarInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ server bool zb_cooprespawn = false;
server bool zb_respawn = true;
server bool zb_autonoderespawn = true;
server bool zb_anynoderespawn = true;
server float zb_talkfrequency = 1;
server string zb_nodevar = "nodelist";

server string zb_names = "Jack,Persephone,Èmille,Robert,Amanda,Maria,Mary,Josh,Wagner,John,Louis,Gabriel,Renato,Alejandro,Alexander,Heinrich,Caesar,Walter,Amy,Lawrence,Marylenne,Leonhart,Leonard,Jackson,Lee,Bert,Humberto,Mike,Pablo,Michael,Hitchcock,Hilton,Ronald,Robinson,Son,House,Romulus,Peter,Peterson,Zephyrus,Robin,Paul,Paula,Thorson,Robohead,Minchson,James,Jamilton,Greg,Gregor,Gregory,Victoria,Anita,Whindersson,Melody,Xonon,Xihil,Thought,Hope,Rebecca,Prince,Larry,Barry,Garry,Garmond,Barney";
252 changes: 157 additions & 95 deletions ZScript.zsc

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions ZetaCode/Pathing.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class ZTPathNode : ZTPositionMarker
icosts.set(self, 0);
openSet.add(self, 0);

DebugLog(LT_VERBOSE, String.Format("> Pathfinding to: %s", other.NodeName()));
DebugLog(LT_VERBOSE, String.Format("> Pathfinding from %s to %s", NodeName(), other.NodeName()));

while ( openSet.length() > 0 )
{
Expand Down Expand Up @@ -486,8 +486,13 @@ class ZTPathNode : ZTPositionMarker
if ( diffZ > maxZDiff )
return false;

if (!CheckSight(next) && LineTrace(AngleTo(next), Distance3D(next), PitchTo(next, 32), TRF_THRUACTORS | TRF_THRUHITSCAN, 32))
return false;
if (!CheckSight(next)) {
FLineTraceData sight;
LineTrace(AngleTo(next), Distance2D(next), PitchTo(next, 40), TRF_THRUACTORS | TRF_THRUHITSCAN, 40, data: sight);

if (sight.HitType == TRACE_HITWALL)
return false;
}

return true;
}
Expand All @@ -498,8 +503,8 @@ class ZTPathNode : ZTPositionMarker

if (other.pos.z + other.height / 2 == pos.z + height / 2 + offsZ) return 0;

return atan(offsZ + other.pos.z + other.height / 2 - pos.z - height / 2);
//return offsZ + other.pos.z + other.height / 2 - pos.z - height / 2;
//return atan(offsZ + other.pos.z + other.height / 2 - pos.z - height / 2);
return offsZ + other.pos.z + other.height / 2 - pos.z - height / 2;
}
}

Expand Down
2 changes: 0 additions & 2 deletions ZetaCode/PawnClasses/ZetaBotPawn.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ZetaBotPawn : Actor {
PainChance 100;
Speed 1;
Obituary "%o wound up smarted out by %NAME%!";
Species "ZetaBot";
ZetaBotPawn.DefaultInv "";
Health 100;
Radius 16;
Expand All @@ -33,7 +32,6 @@ class ZetaBotPawn : Actor {
+ACTIVATEMCROSS
+PUSHABLE
+ISMONSTER
+THRUSPECIES
//+BLOCKASPLAYER

-CANPUSHWALLS
Expand Down
8 changes: 4 additions & 4 deletions ZetaCode/PawnClasses/ZetaDoom.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ class ZetaDoom : ZetaBotPawn
Stop;

Death:
PLAY H 10;
PLAY H 10 A_OnDeath;
PLAY I 10 A_PlaySound("ztmisc/die");
PLAY J 0 A_NoBlocking;
PLAY J 10 A_OnDeath;
PLAY J 10;
PLAY KLM 10;
PLAY N -1;
Stop;

XDeath:
PLAY O 5;
PLAY O 5 A_OnDeath;
PLAY P 5 A_PlaySound("ztmisc/xdie");
PLAY Q 0 A_NoBlocking;
PLAY Q 5 A_OnDeath;
PLAY Q 5;
PLAY RSTUV 5;
PLAY W -1;
}
Expand Down
8 changes: 5 additions & 3 deletions ZetaCode/PawnClasses/ZetaSMushes.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@ class ZetaSMushes : ZetaBotPawn
Stop;

Death:
DRGN I 6;
DRGN I 6 A_OnDeath;
DRGN J 8 A_PlaySound("player/dragon/death");
DRGN K 9 A_NoBlocking;
DRGN L 8 A_OnDeath;
DRGN L 8;
DRGN N -1;
Stop;

XDeath:
TNT1 A 0 {
A_OnDeath();

string gibClassName = "GibFX";
class<Actor> gibClass = gibClassName;

Expand All @@ -103,7 +105,7 @@ class ZetaSMushes : ZetaBotPawn
}
BDPL A 0 A_NoBlocking;
BDPL A 0 A_NoBlocking;
BDPL A 0 A_OnDeath;
BDPL A 0;
BDPL A -1;
Stop;
}
Expand Down
14 changes: 9 additions & 5 deletions ZetaCode/PawnClasses/ZetaStrife.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,21 @@ class ZetaStrife : ZetaBotPawn
Stop;

Death:
PLAY H 3;
PLAY H 3 A_OnDeath;
PLAY I 3 A_PlaySound("ztmisc/die");
PLAY J 0 A_NoBlocking;
PLAY J 3 A_OnDeath;
PLAY J 3;
PLAY KLMNO 4;
PLAY P -1;
Stop;

XDeath:
RGIB A 5 A_TossGib;
RGIB A 5 {
A_OnDeath();
A_TossGib();
}
RGIB B 5 A_PlaySound("ztmisc/xdie");
RGIB C 0 A_OnDeath;
RGIB C 0;
RGIB C 5 A_NoBlocking;
RGIB DEFG 5 A_TossGib;
RGIB H -1 A_TossGib;
Expand All @@ -83,10 +86,11 @@ class ZetaStrife : ZetaBotPawn
WAVE ABCD 3;
Loop;
Burn:
BURN A 0 A_OnDeath;
BURN A 3 Bright A_PlaySound("human/imonfire", CHAN_VOICE);
BURN B 3 Bright A_DropFire;
BURN C 3 Bright A_Wander;
BURN D 0 Bright A_OnDeath;
BURN D 0 Bright;
BURN D 3 Bright A_NoBlocking;
BURN E 5 Bright A_DropFire;
BURN FGH 5 Bright A_Wander;
Expand Down
2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
NAME=ZetaBot
VERSION=0.6.1-pre
VERSION=0.7.0

ADDFOLDER ZetaCode
ADDFOLDER sprites
Expand Down

0 comments on commit 19ecdbf

Please sign in to comment.