git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3462 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d35ca68b3a
commit
86a45f1a55
5 changed files with 35 additions and 136 deletions
|
@ -520,15 +520,11 @@ void(float dist) ai_walk =
|
|||
{
|
||||
if (self.hold == 1)
|
||||
{
|
||||
self.th_stand;
|
||||
self.hold = 0;
|
||||
return;
|
||||
}
|
||||
if (self.hold > 1)
|
||||
{
|
||||
self.th_stand ();
|
||||
|
||||
|
||||
self.hold = self.hold - 1;
|
||||
return;
|
||||
}
|
||||
|
@ -554,15 +550,11 @@ void() ai_stand =
|
|||
{
|
||||
if (self.hold == 1)
|
||||
{
|
||||
self.th_stand;
|
||||
self.hold = 0;
|
||||
return;
|
||||
}
|
||||
if (self.hold > 1)
|
||||
{
|
||||
self.th_stand ();
|
||||
|
||||
|
||||
self.hold = self.hold - 1;
|
||||
return;
|
||||
}
|
||||
|
@ -754,8 +746,6 @@ void(float dist) ai_run =
|
|||
if (self.hold > 1)
|
||||
{
|
||||
self.th_stand ();
|
||||
|
||||
|
||||
self.hold = self.hold - 1;
|
||||
self.think = self.th_run;
|
||||
self.nextthink = time + 0.1;
|
||||
|
|
|
@ -134,14 +134,10 @@ void() DecodeLevelParms =
|
|||
setspawnparms(self);
|
||||
|
||||
|
||||
if (parm5 > 0)
|
||||
self.skill_combat = parm5;
|
||||
if (parm6 > 0)
|
||||
self.skill_doctor = parm6;
|
||||
if (parm7 > 0)
|
||||
self.skill_sneak = parm7;
|
||||
if (parm14 > 0)
|
||||
self.skill_science = parm14;
|
||||
self.skill_combat = parm5;
|
||||
self.skill_doctor = parm6;
|
||||
self.skill_sneak = parm7;
|
||||
self.skill_science = parm14;
|
||||
|
||||
self.ammo_shells = parm8;
|
||||
self.perk1 = parm9;
|
||||
|
@ -362,6 +358,11 @@ void() changelevel_touch =
|
|||
sprint (other, 2,"there are more hostages to save.\n");
|
||||
return;
|
||||
}
|
||||
else if ((world.map_obj == OBJ_DEADTOWN && hostages > 0) && random()<0.02)
|
||||
{
|
||||
sprint (other, 2,"there are more hostages to save.\n");
|
||||
return;
|
||||
}
|
||||
else if ((world.map_obj == OBJ_SUPPLY && supplies > 0) && random()<0.02)
|
||||
{
|
||||
sprint (other, 2,"there are more supplies to secure.\n");
|
||||
|
|
|
@ -299,5 +299,8 @@ void (vector jojo) spawn_civilian =
|
|||
te = te.chain;
|
||||
}
|
||||
|
||||
if (self.waterlevel >= 2)
|
||||
remove(self);
|
||||
|
||||
self = oself;
|
||||
};
|
|
@ -102,7 +102,7 @@ float() crandom =
|
|||
|
||||
void(float slotno) UsePerk =
|
||||
{
|
||||
local float x;
|
||||
local float x, mcount;
|
||||
local string y, timeleft;
|
||||
local entity te;
|
||||
|
||||
|
@ -140,8 +140,9 @@ void(float slotno) UsePerk =
|
|||
{
|
||||
if (te.classname == "monster")
|
||||
{
|
||||
te.hold = 80;
|
||||
te.hold = 160;
|
||||
spawn_stop(te, 10);
|
||||
mcount = mcount + 1;
|
||||
}
|
||||
te = te.chain;
|
||||
}
|
||||
|
|
|
@ -615,16 +615,11 @@ void() zombie_die =
|
|||
|
||||
r = random();
|
||||
|
||||
if (r <= 0.20)
|
||||
sound (self, CHAN_VOICE, "player/agdie1.wav", 1, ATTN_NORM);
|
||||
else if (r <= 0.40)
|
||||
sound (self, CHAN_VOICE, "player/agdie2.wav", 1, ATTN_NORM);
|
||||
else if (r <= 0.60)
|
||||
sound (self, CHAN_VOICE, "player/agdie3.wav", 1, ATTN_NORM);
|
||||
else if (r <= 0.80)
|
||||
sound (self, CHAN_VOICE, "player/agdie4.wav", 1, ATTN_NORM);
|
||||
if (r <= 0.50)
|
||||
sound (self, CHAN_VOICE, "zombie/z_pain.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound (self, CHAN_VOICE, "player/agdie5.wav", 1, ATTN_NORM);
|
||||
sound (self, CHAN_VOICE, "zombie/z_pain1.wav", 1, ATTN_NORM);
|
||||
|
||||
|
||||
spawn_live_zombie(self.origin, self.angles);
|
||||
remove(self);
|
||||
|
@ -726,15 +721,21 @@ void () spawn_ghoul_copy =
|
|||
local entity te, ze;
|
||||
local vector jojo;
|
||||
local float zomc, pcount, loadzombie;
|
||||
local string finder;
|
||||
local string finder, waterlev;
|
||||
local vector stuff;
|
||||
|
||||
|
||||
|
||||
|
||||
self.think = spawn_ghoul_copy;
|
||||
self.nextthink = time + 20 + random()*10;
|
||||
self.nextthink = time + 5 + random()*5;
|
||||
stuff = self.origin;
|
||||
|
||||
waterlev = ftos(pointcontents(self.origin));
|
||||
|
||||
bprint(2, "pointcontents: ");
|
||||
bprint(2, waterlev);
|
||||
bprint(2, "\n");
|
||||
|
||||
|
||||
loadzombie = 0;
|
||||
|
@ -748,6 +749,12 @@ void () spawn_ghoul_copy =
|
|||
te = te.chain;
|
||||
}
|
||||
|
||||
if (loadzombie == 0)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ze = find (world, netname, "ghoul");
|
||||
|
@ -771,7 +778,7 @@ void () spawn_ghoul_copy =
|
|||
ze = find(ze, classname, "player");
|
||||
}
|
||||
|
||||
if (zomc > 60*pcount)
|
||||
if (zomc > 90*pcount)
|
||||
return;
|
||||
|
||||
zombie = spawn ();
|
||||
|
@ -837,98 +844,6 @@ void () spawn_ghoul_copy =
|
|||
walkmonster_start_go ();
|
||||
};
|
||||
|
||||
void (vector jojo) spawn_ghoul =
|
||||
{
|
||||
local entity zombie, lair;
|
||||
local entity te, ze;
|
||||
local float stop;
|
||||
local vector jojo;
|
||||
local float zomc, pcount;
|
||||
|
||||
|
||||
ze = findradius(jojo, 256);
|
||||
while (ze)
|
||||
{
|
||||
|
||||
if (ze.classname == "lair")
|
||||
stop = 1;
|
||||
|
||||
ze = ze.chain;
|
||||
}
|
||||
|
||||
if (stop == 0)
|
||||
{
|
||||
lair = spawn ();
|
||||
self = lair;
|
||||
self.solid = SOLID_NOT;
|
||||
self.movetype = MOVETYPE_STEP;
|
||||
setsize (self, '0 0 0', '0 0 0');
|
||||
self.netname = "lair";
|
||||
self.think = spawn_ghoul_copy;
|
||||
self.nextthink = time + 20 + random()*10;
|
||||
}
|
||||
|
||||
zombie = spawn ();
|
||||
self = zombie;
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_STEP;
|
||||
setmodel (self, "progs/ghoul.mdl");
|
||||
setsize (self, '-8 -8 -24', '8 8 24');
|
||||
self.health = 60;
|
||||
self.netname = "ghoul";
|
||||
self.max_health = self.health;
|
||||
self.th_stand = zombie_stand1;
|
||||
self.th_walk = zombie_walk1;
|
||||
self.th_run = zombie_run1;
|
||||
self.th_pain = zombie_pain;
|
||||
self.th_die = zombie_die;
|
||||
self.th_melee = zombie_melee;
|
||||
self.angles_y = random()*360;
|
||||
|
||||
self.origin = jojo + '0 64 0';
|
||||
self.origin_z = self.origin_z + 1;
|
||||
droptofloor();
|
||||
|
||||
if (!walkmove(0, 0))
|
||||
{
|
||||
self.origin = jojo + '0 -64 0';
|
||||
self.origin_z = self.origin_z + 1;
|
||||
droptofloor();
|
||||
if (!walkmove(0, 0))
|
||||
{
|
||||
self.origin = jojo + '64 0 0';
|
||||
self.origin_z = self.origin_z + 1;
|
||||
droptofloor();
|
||||
if (!walkmove(0, 0))
|
||||
{
|
||||
self.origin = jojo + '-64 0 0';
|
||||
self.origin_z = self.origin_z + 1;
|
||||
droptofloor();
|
||||
if (!walkmove(0, 0))
|
||||
{
|
||||
remove(self);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
te = findradius (self.origin, 30);
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "player" || te.classname == "monster" && te.health > 0)
|
||||
{
|
||||
remove(self);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
te = te.chain;
|
||||
}
|
||||
|
||||
self.classname = "monster";
|
||||
walkmonster_start_go ();
|
||||
};
|
||||
|
||||
void() monster_zombie =
|
||||
{
|
||||
|
@ -945,8 +860,6 @@ void() monster_zombie =
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
precache_model ("progs/ghoul.mdl");
|
||||
precache_model ("progs/h_zombie.mdl");
|
||||
precache_model ("progs/zom_gib.mdl");
|
||||
|
@ -988,6 +901,7 @@ void() monster_zombie =
|
|||
lair.movetype = MOVETYPE_STEP;
|
||||
setsize (lair, '0 0 0', '0 0 0');
|
||||
lair.netname = "lair";
|
||||
lair.classname = "lair";
|
||||
lair.nextthink = time + 30;
|
||||
lair.think = spawn_ghoul_copy;
|
||||
lair.nextthink = time + 30;
|
||||
|
@ -1015,16 +929,6 @@ void() monster_zombie =
|
|||
|
||||
|
||||
|
||||
/*
|
||||
spawn_ghoul(self.origin + '-128 -128 0');
|
||||
spawn_ghoul(self.origin + '-128 0 0');
|
||||
spawn_ghoul(self.origin + '0 -128 0');
|
||||
spawn_ghoul(self.origin + '0 128 0');
|
||||
spawn_ghoul(self.origin + '128 0 0');
|
||||
spawn_ghoul(self.origin + '128 128 0');
|
||||
spawn_ghoul(self.origin + '-128 128 0');
|
||||
spawn_ghoul(self.origin + '128 -128 0');*/
|
||||
|
||||
if (random()<0.25 && world.map_obj == 1)
|
||||
spawn_civilian(self.origin);
|
||||
|
||||
|
|
Loading…
Reference in a new issue