Compilation fixes for "recent" qfcc.

This commit is contained in:
Bill Currie 2012-07-06 11:29:18 +09:00
parent 25d721153d
commit 08a9c7961b
59 changed files with 1335 additions and 1322 deletions

View file

@ -84,7 +84,7 @@ void() TeamFortress_Discard =
newmis.classname = "ammobox";
newmis.team_no = self.team_no;
makevectors (self.v_angle);
if (self.v_angle_x)
if (self.v_angle.x)
{
newmis.velocity = v_forward*400 + v_up * 200;
}
@ -92,7 +92,7 @@ void() TeamFortress_Discard =
{
newmis.velocity = aim(self, 10000);
newmis.velocity = newmis.velocity * 400;
newmis.velocity_z = 200;
newmis.velocity.z = 200;
}
newmis.avelocity = '0 300 0';
setsize (newmis, '0 0 0', '0 0 0');
@ -119,7 +119,7 @@ void() TeamFortress_SaveMe =
self.last_saveme_sound = time + 4;
}
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (self.weapons_carried & WEAP_MEDIKIT)
@ -134,16 +134,16 @@ void() TeamFortress_SaveMe =
msg_entity = te;
tl = spawn();
tl.origin = self.origin;
tl.origin_z = tl.origin_z + 32;
tl.origin.z = tl.origin.z + 32;
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_LIGHTNING3);
WriteEntity (MSG_ONE, tl);
WriteCoord (MSG_ONE, tl.origin_x);
WriteCoord (MSG_ONE, tl.origin_y);
WriteCoord (MSG_ONE, tl.origin_z + 24);
WriteCoord (MSG_ONE, self.origin_x);
WriteCoord (MSG_ONE, self.origin_y);
WriteCoord (MSG_ONE, self.origin_z);
WriteCoord (MSG_ONE, tl.origin.x);
WriteCoord (MSG_ONE, tl.origin.y);
WriteCoord (MSG_ONE, tl.origin.z + 24);
WriteCoord (MSG_ONE, self.origin.x);
WriteCoord (MSG_ONE, self.origin.y);
WriteCoord (MSG_ONE, self.origin.z);
dremove(tl);
}
}
@ -167,7 +167,7 @@ void(float inAuto) TeamFortress_ID =
local string st, cls;
local string spacer;
src = self.origin + v_forward*10;
src_z = self.absmin_z + self.size_z * 0.7;
src.z = self.absmin.z + self.size.z * 0.7;
if (!inAuto) //WK I.e. just someone is doing it normally
traceline (src, src + v_forward*2048, FALSE, self);
else //WK I.e. it is an autoscan
@ -703,13 +703,13 @@ void() TeamFortress_DropItems =
local float always = FALSE;
local string st;
st = infokey(NIL, "flag_drop");
st = infokey(nil, "flag_drop");
if (!st)
st = infokey(NIL, "fd");
st = infokey(nil, "fd");
if (st == "on" || st == "yes" || st == "1")
always = TRUE;
tg = find (NIL, classname, "item_tfgoal");
tg = find (nil, classname, "item_tfgoal");
while (tg)
{
if (tg.owner == self && tg && tg.classname == "item_tfgoal")

74
ai.qc
View file

@ -30,7 +30,7 @@ void() wiz_die;
/*
.enemy
Will be NIL if not currently angry at anyone.
Will be nil if not currently angry at anyone.
.movetarget
The next path spot to walk toward. If .enemy, ignore .movetarget.
@ -129,8 +129,8 @@ void(entity test) AI_Check_Contents =
if (self.health > self.max_health)
self.health = self.max_health;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, 5, 0, TF_TD_ELECTRICITY);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, 5, 0, TF_TD_ELECTRICITY);
}
}
if (entpointcontents(test) == CONTENTS_LAVA)
@ -140,7 +140,7 @@ void(entity test) AI_Check_Contents =
self.dmgtime = time + 1;
// Asbestos armor helps against lava, but I doubt it'll save you :)
//TF_T_Damage (self, NIL, NIL, 25, 0, TF_TD_FIRE);
//TF_T_Damage (self, nil, nil, 25, 0, TF_TD_FIRE);
if (IsMonster(self))
{
local string MName;
@ -182,8 +182,8 @@ void(entity test) AI_Check_Contents =
if (self.dmgtime < time)
{
self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, 5, 0, TF_TD_ELECTRICITY);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, 5, 0, TF_TD_ELECTRICITY);
if (IsMonster(self))
{
@ -219,8 +219,8 @@ void(entity test) AI_Check_Contents =
if (self.dmgtime < time)
{
// self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
//self.think = custom_demon_die;
//self.nextthink=time+0.1;
@ -246,8 +246,8 @@ void(entity test) AI_Check_Contents =
if (self.dmgtime < time)
{
// self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
if (self.ltime > time - 4) //- OfN - if it felt just after summon
@ -274,8 +274,8 @@ void(entity test) AI_Check_Contents =
if (self.dmgtime < time)
{
// self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
self.think = custom_shambler_die;
self.nextthink=time+0.1;
@ -292,8 +292,8 @@ void(entity test) AI_Check_Contents =
if (self.dmgtime < time)
{
// self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
//TF_T_Damage (self, NIL, NIL, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
//T_Damage (self, nil, nil, 4*self.waterlevel);
//TF_T_Damage (self, nil, nil, (self.health - 1), 0, TF_TD_IGNOREARMOUR);
self.think = wiz_die;
self.nextthink=time+0.1;
@ -387,7 +387,7 @@ local entity temp;
sound (self, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
//RPrint ("t_movetarget\n");
self.goalentity = self.movetarget = find (NIL, targetname, other.target);
self.goalentity = self.movetarget = find (nil, targetname, other.target);
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
if (!self.movetarget)
{
@ -475,7 +475,7 @@ void() ChangeYaw =
//current_yaw = self.ideal_yaw;
// mod down the current angle
current_yaw = anglemod( self.angles_y );
current_yaw = anglemod( self.angles.y );
ideal = self.ideal_yaw;
if (current_yaw == ideal)
@ -506,7 +506,7 @@ void() ChangeYaw =
current_yaw = anglemod (current_yaw + move);
self.angles_y = current_yaw;
self.angles.y = current_yaw;
};
*/
@ -584,7 +584,7 @@ void() FoundTarget =
entity (entity scanner) LookAround =
{
if (infokey(NIL,"ceasefire")=="on") //OfN
if (infokey(nil,"ceasefire")=="on") //OfN
return scanner;
local entity client;
@ -826,7 +826,7 @@ float() FindTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
} */
@ -844,9 +844,9 @@ void(float dist) ai_forward =
{
AI_Check_Contents(self); //CH check if in lava
if (self.tfstate & TFSTATE_TRANQUILISED)
walkmove (self.angles_y, (dist * (AI_TRANQ_FACTOR_UP / AI_TRANQ_FACTOR_DN))); //Tranq
walkmove (self.angles.y, (dist * (AI_TRANQ_FACTOR_UP / AI_TRANQ_FACTOR_DN))); //Tranq
else
walkmove (self.angles_y, dist);
walkmove (self.angles.y, dist);
};
@ -854,9 +854,9 @@ void(float dist) ai_back =
{
AI_Check_Contents(self); //CH check if in lava
if (self.tfstate & TFSTATE_TRANQUILISED)
walkmove ( (self.angles_y+180), (dist * (AI_TRANQ_FACTOR_UP / AI_TRANQ_FACTOR_DN))); //Tranq
walkmove ( (self.angles.y+180), (dist * (AI_TRANQ_FACTOR_UP / AI_TRANQ_FACTOR_DN))); //Tranq
else
walkmove ( (self.angles_y+180), dist);
walkmove ( (self.angles.y+180), dist);
};
@ -986,22 +986,22 @@ void(vector dest3) ChooseTurn =
dir = self.origin - dest3;
newdir_x = trace_plane_normal_y;
newdir_y = 0 - trace_plane_normal_x;
newdir_z = 0;
newdir.x = trace_plane_normal.y;
newdir.y = 0 - trace_plane_normal.x;
newdir.z = 0;
if (dir * newdir > 0)
{
dir_x = 0 - trace_plane_normal_y;
dir_y = trace_plane_normal_x;
dir.x = 0 - trace_plane_normal.y;
dir.y = trace_plane_normal.x;
}
else
{
dir_x = trace_plane_normal_y;
dir_y = 0 - trace_plane_normal_x;
dir.x = trace_plane_normal.y;
dir.y = 0 - trace_plane_normal.x;
}
dir_z = 0;
dir.z = 0;
self.ideal_yaw = vectoyaw(dir);
};
@ -1015,7 +1015,7 @@ float() FacingIdeal =
{
local float delta;
delta = anglemod(self.angles_y - self.ideal_yaw);
delta = anglemod(self.angles.y - self.ideal_yaw);
if (delta > 45 && delta < 315)
return FALSE;
return TRUE;
@ -1154,11 +1154,11 @@ void(float dist) ai_run =
else
movedist = dist;
if (infokey(NIL,"ceasefire")=="on") //CH
if (infokey(nil,"ceasefire")=="on") //CH
{
enemy_vis=FALSE;
self.enemy=NIL;
self.goalentity=NIL;
self.enemy=nil;
self.goalentity=nil;
if (self.movetarget)
self.th_walk ();
@ -1171,7 +1171,7 @@ void(float dist) ai_run =
// see if the enemy is dead
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
{
self.enemy = NIL;
self.enemy = nil;
// FIXME: look all around for other targets
/*if (self.oldenemy.health > 0 && !(self.oldenemy.has_disconnected))
{
@ -1194,7 +1194,7 @@ void(float dist) ai_run =
{
enemy_vis=FALSE;
self.enemy = NIL; // FindTarget ignores self.enemy, duh (fixes stuck monsters)
self.enemy = nil; // FindTarget ignores self.enemy, duh (fixes stuck monsters)
if (self.movetarget)
self.th_walk ();

View file

@ -291,16 +291,16 @@ void() launch_horn =
if (e.classname == "player" || IsMonster(e))
{
if (delta_z < 0)
delta_z = delta_z / -5;
if (delta.z < 0)
delta.z = delta.z / -5;
delta = delta * 0.7;
} else {
if (delta_z < 0)
delta_z = delta_z / -2;
if (delta.z < 0)
delta.z = delta.z / -2;
delta = delta * 0.7;
if (delta_z < 100)
delta_z = 100;
if (delta.z < 100)
delta.z = 100;
}
}

21
army.qc
View file

@ -297,7 +297,7 @@ void(float inp) Menu_Army_Input2 =
if (self.demon_one.enemy)//self.demon_one.goalentity)
{
self.demon_one.enemy=NIL;
self.demon_one.enemy=nil;
self.demon_one.goalentity = ReturnEasyWaypoint(self.demon_one,self.demon_one);
}
@ -431,7 +431,7 @@ void(float inp) Menu_Army_Input1 =
dremove(self.demon_one.demon_two);*/ // OfN - prova
self.demon_one.martyr_enemy = CreateWaypoint(self.origin, WAYPOINT_LIFE, WAYPOINT_TYPE_PRIMARY);
self.demon_one.martyr_enemy.goalentity = NIL;
self.demon_one.martyr_enemy.goalentity = nil;
self.demon_one.penance_time=3;
if (visible2(self.demon_one,self.demon_one.martyr_enemy)) self.demon_one.goalentity = self.demon_one.martyr_enemy;
@ -525,7 +525,7 @@ void(float inp) Menu_Army_Input1 =
self.demon_one.effects &= ~EF_DIMLIGHT;
}
self.demon_one.goalentity = NIL;
self.demon_one.goalentity = nil;
PrintFromSoldier(self.demon_one,self,"Holding position...\n");
self.demon_one.penance_time = 2;
@ -583,7 +583,7 @@ void(float inp) Menu_Army_Input1 =
float() TeleSoldier =
{
makevectors (self.v_angle);
v_forward_z = 0;
v_forward.z = 0;
v_forward = normalize(v_forward) * 64;
newmis = spawn();
@ -677,7 +677,7 @@ float() TeleSoldier =
newmis.armorclass = 0; //- OfN none // AT_SAVESHOT; // kevlar
newmis.last_saveme_sound = 0; // ? oh that
//newmis.touch = NIL;
//newmis.touch = nil;
newmis.touch = grunty_touch; //-OfN-
newmis.has_holo = time+2; // touch messages delay
newmis.is_detpacking=1; //resets engage enemy to "yes"
@ -687,9 +687,9 @@ float() TeleSoldier =
newmis.max_health = newmis.health;
newmis.ltime=time; // trhown or felt on water?
newmis.martyr_enemy=NIL;
newmis.demon_one=NIL;
newmis.demon_two=NIL;
newmis.martyr_enemy=nil;
newmis.demon_one=nil;
newmis.demon_two=nil;
sprint(self,PRINT_HIGH,"You teleport your soldier.\n");
//PrintFromSoldier(self.demon_one,self,"Your orders?\n");
@ -764,7 +764,7 @@ void() ArmyTimerThink =
entity(entity player) GetArmyTimer =
{
local entity te;
te = find(NIL, classname, "army_timer");
te = find(nil, classname, "army_timer");
while (te)
{
if (te.owner == player)
@ -773,7 +773,7 @@ entity(entity player) GetArmyTimer =
te = find(te, classname, "army_timer");
}
return NIL;
return nil;
};
void() RemoveArmyTimer =
@ -839,6 +839,7 @@ string (float num) Digitize =
else if (num==9)
return "09";
}
return nil;
};
//=======================================================//

293
client.qc
View file

@ -205,7 +205,7 @@ void () PrematchBegin =
if (prematch)
{
bprint(PRINT_HIGH,"œ The game has now started! œ\n");
other = find(NIL, classname, "player");
other = find(nil, classname, "player");
while (other)
{
other.is_abouttodie = TRUE;
@ -213,14 +213,14 @@ void () PrematchBegin =
other.invincible_time = 0;
other.invincible_finished = 0;
other.effects &= ~EF_ANYGLOW;
TF_T_Damage(other, NIL, NIL, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(other, nil, nil, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
other.real_frags = 0;
other.frags = 0;
other = find(other, classname, "player");
}
// - OfN - wtf
/*other = find(NIL, classname, "grunty");
/*other = find(nil, classname, "grunty");
while (other)
{
other.is_abouttodie = TRUE;
@ -228,7 +228,7 @@ void () PrematchBegin =
other.invincible_time = 0;
other.invincible_finished = 0;
other.effects &= ~EF_ANYGLOW;
TF_T_Damage(other, NIL, NIL, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(other, nil, nil, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
other = find(other, classname, "grunty");
}*/
}
@ -257,7 +257,7 @@ void () PrematchBegin =
oself = self;
other = find(NIL, classname, "player");
other = find(nil, classname, "player");
while (other)
{
if (livesperguy > 0)
@ -273,7 +273,7 @@ void () PrematchBegin =
kill_my_demon();
DetonateAllGuns();
TF_T_Damage(other, NIL, NIL, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(other, nil, nil, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
other = find(other, classname, "player");
}
@ -296,7 +296,7 @@ void () TeamAllPlayers =
{
local entity other, oself;
other = find(NIL, classname, "player");
other = find(nil, classname, "player");
while (other)
{
if (other.team_no <= 0 && !other.has_disconnected)
@ -383,13 +383,13 @@ void () TeamAllPlayers =
local string st;
// Kill the round timer
other = find(NIL, classname, "chris_round_timer");
other = find(nil, classname, "chris_round_timer");
// I deliberately don't do a contingency check here - if it screws up I wanna know about it
dremove(other);
st = infokey(NIL, "pm");
st = infokey(nil, "pm");
if (!st) // if 'pm' isn't set, try 'prematch'
st = infokey(NIL, "prematch");
st = infokey(nil, "prematch");
if (st == "on") // if it reads 'on', do a 30 second prematch
prematchtime = time + 30;
else // if it doesn't read 'on'...
@ -402,10 +402,10 @@ void () TeamAllPlayers =
prematch = FALSE; // otherwise, no prematch
// Kill everyone
/* other = find(NIL, classname, "player");
/* other = find(nil, classname, "player");
while (other)
{
TF_T_Damage(other, NIL, NIL, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(other, nil, nil, other.health + 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
other = find(other, classname, "player");
} Don't kill everyone here or it drops the flag
*/
@ -448,7 +448,7 @@ void() SetToggleFlags =
#endif
// Is this a FortressMap?
ent = find(NIL, classname, "info_tfdetect");
ent = find(nil, classname, "info_tfdetect");
if (ent)
{
// Turn on Teamplay
@ -468,7 +468,7 @@ void() SetToggleFlags =
else
{
// Is this a CTF map?
ent = find(NIL, classname, "info_player_team1");
ent = find(nil, classname, "info_player_team1");
if ((ent) || (CTF_Map == TRUE))
{
// Turn on CTF MAP
@ -539,16 +539,16 @@ void() SetToggleFlags =
toggleflags |= TFLAG_CHEATCHECK;
}
st = infokey(NIL, "temp1");
st = infokey(nil, "temp1");
toggleflags |= TFLAG_FIRSTENTRY | stof(st);
local float autoteam_time;
autoteam_time = 30;
// check all serverinfo settings, to set the appropriate toggleflags
// AUTOTEAM
st = infokey(NIL, "a");
st = infokey(nil, "a");
if (!st)
st = infokey(NIL, "autoteam");
st = infokey(nil, "autoteam");
if (st == "on")
toggleflags |= TFLAG_AUTOTEAM;
else if (st == "off")
@ -560,18 +560,18 @@ void() SetToggleFlags =
}
// TEAMFRAGS
st = infokey(NIL, "t");
st = infokey(nil, "t");
if (!st)
st = infokey(NIL, "teamfrags");
st = infokey(nil, "teamfrags");
if (st == "on")
toggleflags |= TFLAG_TEAMFRAGS;
else if (st == "off")
toggleflags &= ~TFLAG_TEAMFRAGS;
//WK JELLO WATER
st = infokey(NIL, "j");
st = infokey(nil, "j");
if (!st)
st = infokey(NIL, "jello");
st = infokey(nil, "jello");
if (st == "on")
jello = TRUE;
else {
@ -585,18 +585,18 @@ void() SetToggleFlags =
//WK JELLO WATER
light_damage = FALSE;
st = infokey(NIL, "ld");
st = infokey(nil, "ld");
if (!st)
st = infokey(NIL, "lightdamage");
st = infokey(nil, "lightdamage");
if (st == "on")
light_damage = TRUE;
// SB New, improved TF 2.9 fake prematch mode!
// We can make a class, come in, run around, play tag the flag, but can't do anything
// useful until the prematch is over!
st = infokey(NIL, "pm");
st = infokey(nil, "pm");
if (!st) // if 'pm' isn't set, try 'prematch'
st = infokey(NIL, "prematch");
st = infokey(nil, "prematch");
if (st == "on") // if it reads 'on', do a 30 second prematch
prematchtime = time + 30;
else // if it doesn't read 'on'...
@ -611,18 +611,18 @@ void() SetToggleFlags =
prematch = FALSE; // otherwise, no prematch
//WK Bounty System
st = infokey(NIL, "bounty");
st = infokey(nil, "bounty");
if (!st)
st = infokey(NIL, "moola");
st = infokey(nil, "moola");
if (st == "on")
bounty = TRUE;
else
bounty = FALSE;
//CH Sets the starting amount of money :)
st = infokey(NIL, "m");
st = infokey(nil, "m");
if (!st)
st = infokey(NIL, "money");
st = infokey(nil, "money");
local float numba;
numba = stof(st);
if (numba)
@ -631,23 +631,23 @@ void() SetToggleFlags =
custom_money = SPENDING_LIMIT;
// GRAPPLING HOOK
st = infokey(NIL, "g");
st = infokey(nil, "g");
if (!st)
st = infokey(NIL, "grapple");
st = infokey(nil, "grapple");
if (st == "off")
allow_hook = FALSE;
if (!(toggleflags & TFLAG_GRAPPLE) && st != "on")
allow_hook = FALSE;
// SPY OFF
st = infokey(NIL, "spy");
st = infokey(nil, "spy");
if (st == "off")
spy_off = TRUE;
// SPY INVIS ONLY
st = infokey(NIL, "s");
st = infokey(nil, "s");
if (!st)
st = infokey(NIL, "spyinvis");
st = infokey(nil, "spyinvis");
if (st == "on" || toggleflags & TFLAG_SPYINVIS)
invis_only = TRUE;
else if (st == "off")
@ -657,9 +657,9 @@ void() SetToggleFlags =
invis_only = TRUE;
// RespawnDelay
st = infokey(NIL, "rd");
st = infokey(nil, "rd");
if (!st)
st = infokey(NIL, "respawn_delay");
st = infokey(nil, "respawn_delay");
respawn_delay_time = stof(st);
if (respawn_delay_time)
toggleflags |= TFLAG_RESPAWNDELAY;
@ -678,9 +678,9 @@ void() SetToggleFlags =
ent.think = autoteam_think;
}
st = infokey (NIL, "improve_respawns");
st = infokey (nil, "improve_respawns");
if (st == "1" || st == "on") {
local entity ent = NIL;
local entity ent = nil;
while ((ent = find (ent, classname, "info_tfgoal"))) {
if (ent.ammo_shells && ent.ammo_nails
&& ent.ammo_rockets && ent.ammo_cells
@ -713,25 +713,25 @@ void() SetToggleFlags =
}
}
st = infokey(NIL, "ir");
st = infokey(nil, "ir");
if (!st)
st = infokey(NIL, "instant_repair");
st = infokey(nil, "instant_repair");
if (st == "1" || st == "on")
instant_repair = TRUE;
else
instant_repair = FALSE;
st = infokey(NIL, "fe");
st = infokey(nil, "fe");
if (!st)
st = infokey(NIL, "flag_emu");
st = infokey(nil, "flag_emu");
if (st == "1" || st == "on")
toggleflags |= TFLAG_FLAGEMU;
else if (st == "0" || st == "off")
toggleflags &= ~TFLAG_FLAGEMU;
st = infokey(NIL, "ws");
st = infokey(nil, "ws");
if (!st)
st = infokey(NIL, "use_standard");
st = infokey(nil, "use_standard");
if (st == "1" || st == "on")
toggleflags |= TFLAG_WARSTANDARD;
else
@ -796,7 +796,7 @@ entity() FindIntermission =
local float cyc;
// look for info_intermission first
spot = find (NIL, classname, "info_intermission");
spot = find (nil, classname, "info_intermission");
if (spot)
{ // pick a random one
cyc = random() * 1;
@ -814,12 +814,12 @@ entity() FindIntermission =
}
// then look for the start position
spot = find (NIL, classname, "info_player_start");
spot = find (nil, classname, "info_player_start");
if (spot)
return spot;
// then look through the deathmatch starts
spot = find (NIL, classname, "info_player_deathmatch");
spot = find (nil, classname, "info_player_deathmatch");
if (spot)
{
// pick a random one
@ -836,6 +836,7 @@ entity() FindIntermission =
objerror ("FindIntermission: no spot");
return nil; //FIXME no-return functions
};
/*===========================
@ -856,7 +857,7 @@ entity (entity start_point) FindNextIntermission =
if (spot)
return spot;
else
start_point = NIL;
start_point = nil;
}
@ -869,17 +870,17 @@ entity (entity start_point) FindNextIntermission =
}
// at the end of the list
spot = find (NIL, classname, "info_intermission");
spot = find (nil, classname, "info_intermission");
if (spot)
return spot;
spot = find (NIL, classname, "info_player_deathmatch");
spot = find (nil, classname, "info_player_deathmatch");
if (spot)
return spot;
}
else // do not cycle though in co-op or single
{
spot = find (NIL, classname, "info_player_start");
spot = find (nil, classname, "info_player_start");
if (spot)
return spot;
}
@ -919,17 +920,17 @@ float() DoExtraCycle =
//-------------------------------------------------//
//- OfN - I tried to make this work like in tf2.8 -//
local string nmap, temp;
nmap = infokey(NIL, "nmap");
nmap = infokey(nil, "nmap");
if (nmap) {
local float minplayers, maxplayers, itsok, currentpl;
if (infokey(NIL,"minp")!="")
minplayers = stof(infokey(NIL,"minp"));
if (infokey(nil,"minp")!="")
minplayers = stof(infokey(nil,"minp"));
else
minplayers = 0;
if (infokey(NIL,"maxp")!="")
maxplayers = stof(infokey(NIL,"maxp"));
if (infokey(nil,"maxp")!="")
maxplayers = stof(infokey(nil,"maxp"));
else
maxplayers = 32;
@ -941,7 +942,7 @@ float() DoExtraCycle =
if (minplayers > currentpl) {
bprint(PRINT_HIGH,"Map ");
nmap = infokey(NIL, "nmap");
nmap = infokey(nil, "nmap");
bprint(PRINT_HIGH, nmap);
bprint(PRINT_HIGH," skipped - minimum players ");
temp = ftos(minplayers);
@ -954,7 +955,7 @@ float() DoExtraCycle =
} else {
if (maxplayers < currentpl) {
bprint(PRINT_HIGH,"Map ");
nmap = infokey(NIL, "nmap");
nmap = infokey(nil, "nmap");
bprint(PRINT_HIGH, nmap);
bprint(PRINT_HIGH," skipped - maximum players ");
temp = ftos(maxplayers);
@ -974,7 +975,7 @@ float() DoExtraCycle =
//execute map conditions ok
if (itsok) {
nmap = infokey(NIL, "nmap");
nmap = infokey(nil, "nmap");
bprint(PRINT_HIGH,"\nLoading ");
bprint(PRINT_HIGH,nmap);
@ -992,7 +993,7 @@ float() DoExtraCycle =
return FALSE;
}
} else if (already_chosen_map == MAP_LOADCYCLE) {
local string st = infokey (NIL, "loopcycle");
local string st = infokey (nil, "loopcycle");
if (st != "0" && st != "off") {
RPrint ("No map loaded, restarting map cycle\n");
SetNextMapNum (0);
@ -1026,9 +1027,9 @@ float() GetNextMapNum =
local float num;
local string maxmapnum;
infostring = infokey (NIL, "n");
infostring = infokey (nil, "n");
num = stof (infostring);
maxmapnum = infokey (NIL, "maxmapnum");
maxmapnum = infokey (nil, "maxmapnum");
if (!infostring) { // always use info when available
if (cvar ("crudefile_quota") >= 0) {
@ -1072,7 +1073,7 @@ void(float mapnum) SetNextMapNum =
localcmd("localinfo n ");
localcmd(mapstring);
localcmd("\n");
setinfokey (NIL, "n", mapstring);
setinfokey (nil, "n", mapstring);
};
void() LoadNextMap =
@ -1119,7 +1120,7 @@ void() LoadNextMap =
if (mapcount == 0)
{
cyc = infokey(NIL, "cycledir");
cyc = infokey(nil, "cycledir");
if (!cyc)
cyc = "qwmcycle";
@ -1144,7 +1145,7 @@ void() GotoNextMap =
if (already_chosen_map != MAP_YES)
{
local string nmap = infokey (NIL, "nmap");
local string nmap = infokey (nil, "nmap");
if (already_chosen_map == MAP_LOADCYCLE && nmap) {
// load up the map config
localcmd ("exec \"mapcfg.cfg\"\n");
@ -1239,7 +1240,7 @@ void() ExitIntermission =
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "Despite the awful might of the Elder\nWorld, you have achieved the Rune of\nElder Magic, capstone of all types of\narcane wisdom. Beyond good and evil,\nbeyond life and death, the Rune\npulsates, heavy with import. Patient and\npotent, the Elder Being Shub-Niggurath\nweaves her dire plans to clear off all\nlife from the Earth, and bring her own\nfoul offspring to our NIL! For all the\ndwellers in these nightmare dimensions\nare her descendants! Once all Runes of\nmagic power are united, the energy\nbehind them will blast open the Gateway\nto Shub-Niggurath, and you can travel\nthere to foil the Hell-Mother's plots\nin person.");
WriteString (MSG_ALL, "Despite the awful might of the Elder\nWorld, you have achieved the Rune of\nElder Magic, capstone of all types of\narcane wisdom. Beyond good and evil,\nbeyond life and death, the Rune\npulsates, heavy with import. Patient and\npotent, the Elder Being Shub-Niggurath\nweaves her dire plans to clear off all\nlife from the Earth, and bring her own\nfoul offspring to our nil! For all the\ndwellers in these nightmare dimensions\nare her descendants! Once all Runes of\nmagic power are united, the energy\nbehind them will blast open the Gateway\nto Shub-Niggurath, and you can travel\nthere to foil the Hell-Mother's plots\nin person.");
return;
}
@ -1313,14 +1314,14 @@ void() execute_changelevel =
WriteByte (MSG_ALL, 3);
WriteByte (MSG_ALL, SVC_INTERMISSION);
WriteCoord (MSG_ALL, pos.origin_x);
WriteCoord (MSG_ALL, pos.origin_y);
WriteCoord (MSG_ALL, pos.origin_z);
WriteAngle (MSG_ALL, pos.mangle_x);
WriteAngle (MSG_ALL, pos.mangle_y);
WriteAngle (MSG_ALL, pos.mangle_z);
WriteCoord (MSG_ALL, pos.origin.x);
WriteCoord (MSG_ALL, pos.origin.y);
WriteCoord (MSG_ALL, pos.origin.z);
WriteAngle (MSG_ALL, pos.mangle.x);
WriteAngle (MSG_ALL, pos.mangle.y);
WriteAngle (MSG_ALL, pos.mangle.z);
other = find (NIL, classname, "player");
other = find (nil, classname, "player");
while (other)
{
other.takedamage = DAMAGE_NO;
@ -1353,7 +1354,7 @@ void() changelevel_touch =
return;
}
self.touch = NIL;
self.touch = nil;
// we can't move people right now, because touch functions are called
// in the middle of C movement code, so set a think time to do it
@ -1477,7 +1478,7 @@ void() ClientKill =
if (self.tfstate & TFSTATE_INFECTED)
{
finished = FALSE;
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (te)
{
if (te.owner == self && te.think == BioInfection_Decay)
@ -1490,7 +1491,7 @@ void() ClientKill =
}
te = find(te, classname, "timer");
if (finished) te = NIL;
if (finished) te = nil;
}
} else
logfrag (self, self);
@ -1553,10 +1554,10 @@ entity(float team_num) FindTeamSpawnPoint =
spot = find(spot, team_str_home, "ts1");
if (!spot)
spot = find(NIL, team_str_home, "ts1");
spot = find(nil, team_str_home, "ts1");
if (!spot)
return NIL;
return nil;
at_spot = findradius(spot.origin, 40);
spot_found = TRUE;
@ -1596,10 +1597,10 @@ entity(float team_num) FindTeamSpawnPoint =
spot = find(spot, team_str_home, "ts2");
if (!spot)
spot = find(NIL, team_str_home, "ts2");
spot = find(nil, team_str_home, "ts2");
if (!spot)
return NIL;
return nil;
at_spot = findradius(spot.origin, 40);
spot_found = TRUE;
@ -1638,10 +1639,10 @@ entity(float team_num) FindTeamSpawnPoint =
spot = find(spot, team_str_home, "ts3");
if (!spot)
spot = find(NIL, team_str_home, "ts3");
spot = find(nil, team_str_home, "ts3");
if (!spot)
return NIL;
return nil;
at_spot = findradius(spot.origin, 40);
spot_found = TRUE;
@ -1680,10 +1681,10 @@ entity(float team_num) FindTeamSpawnPoint =
spot = find(spot, team_str_home, "ts4");
if (!spot)
spot = find(NIL, team_str_home, "ts4");
spot = find(nil, team_str_home, "ts4");
if (!spot)
return NIL;
return nil;
at_spot = findradius(spot.origin, 40);
spot_found = TRUE;
@ -1711,7 +1712,7 @@ entity(float team_num) FindTeamSpawnPoint =
}
// failure
return NIL;
return nil;
};
/*
@ -1730,7 +1731,7 @@ entity() SelectSpawnPoint =
// testinfo_player_start is only found in regioned levels
/*
spot = find (NIL, classname, "testplayerstart");
spot = find (nil, classname, "testplayerstart");
if (spot)
return spot;
*/
@ -1753,7 +1754,7 @@ entity() SelectSpawnPoint =
{
lastspawn = find(lastspawn, classname, "info_player_coop");
if (!lastspawn)
lastspawn = find (NIL, classname, "info_player_coop");
lastspawn = find (nil, classname, "info_player_coop");
if (lastspawn)
return lastspawn;
@ -1763,7 +1764,7 @@ entity() SelectSpawnPoint =
// search through
spot = find(lastspawn, classname, "info_player_deathmatch");
if (!spot)
spot = find(NIL, classname, "info_player_deathmatch");
spot = find(nil, classname, "info_player_deathmatch");
attempts = 0;
while (spot && attempts < 100)
@ -1794,18 +1795,18 @@ entity() SelectSpawnPoint =
spot = find(spot, classname, "info_player_deathmatch");
if (!spot)
spot = find(NIL, classname, "info_player_deathmatch");
spot = find(nil, classname, "info_player_deathmatch");
}
}
if (serverflags)
{ // return with a rune to start
spot = find (NIL, classname, "info_player_start2");
spot = find (nil, classname, "info_player_start2");
if (spot)
return spot;
}
spot = find (NIL, classname, "info_player_start");
spot = find (nil, classname, "info_player_start");
if (!spot)
error ("PutClientInServer: no info_player_start on level\n");
@ -1869,7 +1870,7 @@ void() PutClientInServer =
self.FlashTime = 0;
self.flags = FL_CLIENT;
self.aura = 0; //- OfN
self.crusader_inspirator=NIL; // OfN - needed?
self.crusader_inspirator=nil; // OfN - needed?
self.gravity = 1; //WK
self.air_finished = time + 12;
self.dmg = 2; // initial water damage
@ -2127,8 +2128,8 @@ void() PutClientInServer =
}
// Set Rocket Jump Modifiers
if (stof(infokey(NIL, "rj")) != 0)
rj = stof(infokey(NIL, "rj"));
if (stof(infokey(nil, "rj")) != 0)
rj = stof(infokey(nil, "rj"));
else
rj = 1;
@ -2250,14 +2251,14 @@ void() DumpScore =
error ("DumpScore: world.chain is set");
// build a sorted lis
e = find(NIL, classname, "player");
sort = NIL;
e = find(nil, classname, "player");
sort = nil;
while (e)
{
if (!sort)
{
sort = e;
e.chain = NIL;
e.chain = nil;
}
else
{
@ -2273,7 +2274,7 @@ void() DumpScore =
{
if (!walk.chain)
{
e.chain = NIL;
e.chain = nil;
walk.chain = e;
}
else if (walk.chain.frags < e.frags)
@ -2333,7 +2334,7 @@ Exit deathmatch games upon conditions
void() CheckRules =
{
local string st;
st = infokey (NIL, "cyclenow");
st = infokey (nil, "cyclenow");
if (!cyclenow && (st == "1" || st == "on"))
{
@ -2419,14 +2420,14 @@ void() PlayerJump =
if (self.waterlevel >= 2)
{
if (self.watertype == CONTENTS_WATER)
self.velocity_z = 100;
self.velocity.z = 100;
else if (self.watertype == CONTENTS_SLIME)
self.velocity_z = 80;
self.velocity.z = 80;
else
self.velocity_z = 50;
self.velocity.z = 50;
//WK
if (self.tf_items & NIT_SCUBA)
self.velocity_z = 250;
self.velocity.z = 250;
// play swiming sound
if (self.cutf_items & CUTF_STEALTH) // SB no noise if we have stealth
@ -2462,7 +2463,7 @@ void() PlayerJump =
//WK Sprinters jump higher
//SB No, people with high jump do
if (self.cutf_items & CUTF_HIGHJUMP)
self.velocity_z = self.velocity_z + 400;
self.velocity.z = self.velocity.z + 400;
};
@ -2495,7 +2496,7 @@ void() WaterMove =
if (self.dmg > 6)
self.dmg = 2.2;
if (self.dmg < self.health - 1)
TF_T_Damage (self, NIL, NIL, self.dmg, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage (self, nil, nil, self.dmg, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
self.pain_finished = time + 1;
}
}
@ -2516,7 +2517,7 @@ void() WaterMove =
self.dmg = self.dmg + 2;
if (self.dmg > 15)
self.dmg = 10;
TF_T_Damage (self, NIL, NIL, self.dmg, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage (self, nil, nil, self.dmg, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
self.pain_finished = time + 1;
}
}
@ -2546,7 +2547,7 @@ void() WaterMove =
self.dmgtime = time + 0.2;
// Asbestos armor helps against lava, but I doubt it'll save you :)
TF_T_Damage (self, NIL, NIL, 10*self.waterlevel, 0, TF_TD_FIRE);
TF_T_Damage (self, nil, nil, 10*self.waterlevel, 0, TF_TD_FIRE);
}
}
else if (self.watertype == CONTENTS_SLIME)
@ -2554,8 +2555,8 @@ void() WaterMove =
if (self.dmgtime < time && self.radsuit_finished < time)
{
self.dmgtime = time + 1;
//T_Damage (self, NIL, NIL, 4*self.waterlevel);
TF_T_Damage (self, NIL, NIL, 4*self.waterlevel, 0, TF_TD_ELECTRICITY);
//T_Damage (self, nil, nil, 4*self.waterlevel);
TF_T_Damage (self, nil, nil, 4*self.waterlevel, 0, TF_TD_ELECTRICITY);
}
}
@ -2567,7 +2568,7 @@ void() WaterMove =
sound (self, CHAN_BODY, "player/inlava.wav", 1, ATTN_NORM);
else if (self.watertype == CONTENTS_WATER)
{
if (self.movedir_z > -300)
if (self.movedir.z > -300)
sound (self, CHAN_BODY, "player/inh2o.wav", 1, ATTN_NORM);
else
sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM);
@ -2590,21 +2591,21 @@ void() CheckWaterJump =
// check for a jump-out-of-water
makevectors (self.angles);
start = self.origin;
start_z = start_z + 8;
v_forward_z = 0;
start.z = start.z + 8;
v_forward.z = 0;
normalize(v_forward);
end = start + v_forward*24;
traceline (start, end, TRUE, self);
if (trace_fraction < 1)
{ // solid at waist
start_z = start_z + self.maxs_z - 8;
start.z = start.z + self.maxs.z - 8;
end = start + v_forward*24;
self.movedir = trace_plane_normal * -50;
traceline (start, end, TRUE, self);
if (trace_fraction == 1)
{ // open at eye level
self.flags |= FL_WATERJUMP;
self.velocity_z = 225;
self.velocity.z = 225;
self.flags &= ~FL_JUMPRELEASED;
self.teleport_time = time + 2; // safety net
return;
@ -2645,16 +2646,16 @@ void() PlayerPreThink =
makevectors (self.v_angle); // is this still used?
if (infokey(NIL,"ceasefire")=="on") //Cyto
if (infokey(nil,"ceasefire")=="on") //Cyto
{
#ifndef ceasefire_allows_to_move
if (self.lip)
self.origin = self.oldorigin;
else
{
self.velocity_z = -5000;
self.velocity_x = 0;
self.velocity_y = 0;
self.velocity.z = -5000;
self.velocity.x = 0;
self.velocity.y = 0;
if (self.flags & FL_ONGROUND)
{
self.oldorigin = self.origin;
@ -2699,9 +2700,9 @@ void() PlayerPreThink =
if (foo)
ping = stof(foo);
if (ping < 300) {
self.velocity_x = floor((3 * self.velocity_x) / 4);
self.velocity_y = floor((3 * self.velocity_y) / 4);
self.velocity_z = floor((3 * self.velocity_z) / 4);
self.velocity.x = floor((3 * self.velocity.x) / 4);
self.velocity.y = floor((3 * self.velocity.y) / 4);
self.velocity.z = floor((3 * self.velocity.z) / 4);
}
}
if (self.button2)
@ -2758,16 +2759,16 @@ void() PlayerPreThink =
//WK Scuba commando treads water :)
if ((self.tf_items & NIT_SCUBA) && self.waterlevel > 1) {
if (self.velocity_z >= -25 && self.velocity_z < 0)
self.velocity_z = 10; //Tread water if near a stop
if (self.velocity.z >= -25 && self.velocity.z < 0)
self.velocity.z = 10; //Tread water if near a stop
}
//Jello Water :)
else if (jello && self.waterlevel > 1) {
if (jello == TRUE) //Binary on/off
self.velocity_z = 1000; //900 is a better number for 2forts
self.velocity.z = 1000; //900 is a better number for 2forts
else
self.velocity_z = jello;
self.velocity.z = jello;
}
// teleporters can force a non-moving pause time
@ -2784,16 +2785,16 @@ void() PlayerPreThink =
if (self.on_hook)
{
Service_Grapple ();
if (self.button2 && self.velocity_z > 10)
self.velocity_z = 10; //WK Allow more creative physics with hook
if (self.button2 && self.velocity.z > 10)
self.velocity.z = 10; //WK Allow more creative physics with hook
}
//WK Add Hover Boot Support
if (self.tf_items & NIT_HOVER_BOOTS) {
if (self.button2 && self.velocity_z < 0 && self.hover_time > 0 && self.waterlevel == 0)
if (self.button2 && self.velocity.z < 0 && self.hover_time > 0 && self.waterlevel == 0)
{ //Try to hover
local vector angle = self.angles;
angle_x = -angle_x;
angle.x = -angle.x;
makevectors(angle);
v_up = '0 0 1'; // angle thing is broken for now
@ -2844,7 +2845,7 @@ void() PlayerPreThink =
if (self.health > 0 && self.solid != SOLID_NOT)
{
trace_ent = NIL;
trace_ent = nil;
// do a quick checkmove
checkmove (self.origin, self.mins, self.maxs, self.origin - '0 0 8192', MOVE_NORMAL, self);
@ -2852,7 +2853,7 @@ void() PlayerPreThink =
if (vlen(self.origin) > 16384 || (trace_fraction >= 1 && !trace_startsolid)) // outside the map
{
deathmsg = DMSG_OUTOFBOUNDS;
TF_T_Damage (self, NIL, NIL, self.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage (self, nil, nil, self.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
}
#ifdef REALLY_BUGGY_CODE
else if (trace_startsolid && trace_ent.classname != "force_field")
@ -2869,7 +2870,7 @@ void() PlayerPreThink =
eprint (trace_ent);
#endif
TF_T_Damage (self, NIL, NIL, self.health + 100,
TF_T_Damage (self, nil, nil, self.health + 100,
TF_TD_IGNOREARMOUR, TF_TD_OTHER);
}
else
@ -2883,7 +2884,7 @@ void() PlayerPreThink =
eprint (trace_ent);
#endif
TF_T_Damage (trace_ent, NIL, NIL, self.health + 100,
TF_T_Damage (trace_ent, nil, nil, self.health + 100,
TF_TD_IGNOREARMOUR, TF_TD_OTHER);
}
@ -3132,18 +3133,18 @@ void() PlayerPostThink =
{
if (self.flags & FL_ONGROUND)
{
if (self.movedir_z < -650)
if (self.movedir.z < -650)
{
if (!(self.cutf_items & CUTF_STEALTH)) { //WK Judo teaches falling... SB ceaf judo
self.deathtype = "falling";
T_Damage (self, NIL, NIL, 10);
T_Damage (self, nil, nil, 10);
self.leg_damage++;
if (self.leg_damage > 5)
self.leg_damage = 5;
sound (self, CHAN_VOICE, "player/land2.wav", 1, ATTN_NORM);
}
}
else if (self.movedir_z < -300)
else if (self.movedir.z < -300)
if (!(self.cutf_items & CUTF_STEALTH)) //WK Judo teaches falling... SB ceaf judo
sound (self, CHAN_VOICE, "player/land.wav", 1, ATTN_NORM);
@ -3153,13 +3154,13 @@ void() PlayerPostThink =
if (vlen(self.movedir) - vlen(self.velocity) > 5500 * frametime)
{
self.deathtype = "wall";
T_Damage (self, NIL, NIL, ((vlen(self.movedir) - vlen(self.velocity)) - 550) / 10);
T_Damage (self, nil, nil, ((vlen(self.movedir) - vlen(self.velocity)) - 550) / 10);
}
#endif
;
}
self.jump_flag = self.velocity_z;
self.jump_flag = self.velocity.z;
self.movedir = self.velocity;
CheckPowerups ();
@ -3215,7 +3216,7 @@ void() ClientConnect =
bprint (PRINT_HIGH, " has joined the server\n");
//- OfN - shouldnt be needed anyway...
self.admin_kick = NIL;
self.admin_kick = nil;
// Set Default autozoom
if (DEFAULT_AUTOZOOM == OFF)
@ -3348,7 +3349,7 @@ void() ClientDisconnect =
self.has_disconnected = TRUE;
if (debug_target == self)
debug_target = NIL;
debug_target = nil;
// Remove Timers
TeamFortress_RemoveTimers();
@ -3365,7 +3366,7 @@ void() ClientDisconnect =
//WK Added demon cleanup
kill_my_demon();
//WK Added ammobox/pipebomb fix
te = find(NIL, classname, "ammobox");
te = find(nil, classname, "ammobox");
while (te)
{
if (te.enemy == self) {
@ -3379,7 +3380,7 @@ void() ClientDisconnect =
te = find(te, classname, "ammobox");
}
te = find(NIL, classname, "pipebomb");
te = find(nil, classname, "pipebomb");
while (te)
{
if (te.owner == self) {
@ -3398,7 +3399,7 @@ void() ClientDisconnect =
RemoveArmyTimer();
// Remove Detpacks
te = find(NIL, classname, "detpack");
te = find(nil, classname, "detpack");
while (te)
{
if (te.owner == self)
@ -3413,7 +3414,7 @@ void() ClientDisconnect =
}
dremove(te);
te = NIL;
te = nil;
}
te = find(te, classname, "detpack");
@ -3421,11 +3422,11 @@ void() ClientDisconnect =
// Clear anything that thinks he attacked/hacked it
local entity mrmartyr;
mrmartyr = NIL;
mrmartyr = nil;
do {
mrmartyr = nextent (mrmartyr);
if (mrmartyr && mrmartyr.martyr_enemy == te)
mrmartyr.martyr_enemy = NIL;
mrmartyr.martyr_enemy = nil;
} while (mrmartyr);
set_suicide_frame ();

View file

@ -8,7 +8,7 @@ void(entity client) AddCommandAliases = { };
#else
integer commands_added;
int commands_added;
void() Cmd_Weapon_f;
void() Cmd_Build_f;

View file

@ -240,7 +240,7 @@ void(entity targ, entity attacker) Killed =
Obituary(self, attacker);
self.takedamage = DAMAGE_NO;
self.touch = NIL;
self.touch = nil;
monster_death_use();
self.th_die ();
@ -302,7 +302,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
local float knockem;
mirror = 0;
if (infokey(NIL,"ceasefire")=="on") //Cyto
if (infokey(nil,"ceasefire")=="on") //Cyto
return;
if (!targ)
return;
@ -540,7 +540,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
{
damage = floor(damage * 0.5);
if ((targ.velocity_x > 0 || targ.velocity_y > 0 || targ.velocity_z > 0) && random() > 0.6)
if ((targ.velocity.x > 0 || targ.velocity.y > 0 || targ.velocity.z > 0) && random() > 0.6)
return;
}
else if ((targ.armorclass & AT_SAVEEXPLOSION) && (T_AttackType == TF_TD_EXPLOSION))
@ -706,7 +706,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
return;
}// /////// OFTEN ///////////
//WK Make sure the NIL doesn't have a bastard level
//WK Make sure the nil doesn't have a bastard level
if (attacker.classname != "player" || targ.classname != "player") {
//bprint(PRINT_MEDIUM,"Non player death or kill\n");
Killed(targ, attacker);
@ -721,7 +721,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
local string st;
local float threshold;
threshold = 0;
st = infokey(NIL, "curse");
st = infokey(nil, "curse");
if (st)
threshold = stof(st);

10
coop.qc
View file

@ -12,7 +12,7 @@ void() DroppedKeyThink =
// let the throwing player pick it up again
self.think = dont_think;
self.touch = key_touch;
self.owner = NIL;
self.owner = nil;
};
@ -70,7 +70,7 @@ void() DropKey =
}
newmis.owner = self;
newmis.touch = NIL;
newmis.touch = nil;
setorigin(newmis, self.origin + '0 0 16');
makevectors(self.v_angle);
newmis.velocity = normalize(v_forward) * 300 + '0 0 200';
@ -102,14 +102,14 @@ float() DoorShouldOpen =
{
local entity ptr;
local float plyrcount;
local entity plyr1 = NIL;
local entity plyr2 = NIL;
local entity plyr1 = nil;
local entity plyr2 = nil;
if (coop != 2)
return TRUE;
plyrcount = 0;
ptr = find(NIL, classname, "player");
ptr = find(nil, classname, "player");
while (ptr)
{
if (!(ptr.tf_items & self.items) && ptr.playerclass != PC_UNDEFINED

View file

@ -119,7 +119,7 @@ void() DropToCustomClassGen =
self.gravity = 1;
//st = infokey(NIL, "no_grapple");
//st = infokey(nil, "no_grapple");
self.aura = 0;
@ -142,8 +142,8 @@ void() DropToCustomClassGen =
self.maxammo_medikit = 0;
self.maxammo_detpack = 0;
self.ammo_c4det = 0;
self.demon_one = NIL; //SB - this tells us who our demon is for easy reference
self.demon_two = NIL; //- OfN- Used for hacker job, target building and for timer (% on sbar)
self.demon_one = nil; //SB - this tells us who our demon is for easy reference
self.demon_two = nil; //- OfN- Used for hacker job, target building and for timer (% on sbar)
self.demon_blood = 0;
//self.demon_points = 5;
@ -220,8 +220,8 @@ void() DropFromCustomClassGen =
self.is_killed = FALSE;
//
self.summon_one = NIL;
self.summon_two = NIL;
self.summon_one = nil;
self.summon_two = nil;
self.done_custom = CUSTOM_FINISHED;
self.maxspeed = self.custom_speed;
@ -957,14 +957,14 @@ void() fragspike_touch =
}
else
{
//We bounce off NIL since we are fragments
//We bounce off nil since we are fragments
if (self.heat > 0) {
// self.heat = self.heat - 1;
// if (self.velocity = '0 0 0') { //Skip around
if (1) { //Skip around
self.velocity_x = (random() - 0.5) * 200;
self.velocity_y = (random() - 0.5) * 200;
self.velocity_z = random() * 200;
self.velocity.x = (random() - 0.5) * 200;
self.velocity.y = (random() - 0.5) * 200;
self.velocity.z = random() * 200;
}
}
else {
@ -974,9 +974,9 @@ void() fragspike_touch =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_SUPERSPIKE);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
}
@ -989,24 +989,24 @@ void() FragSpikeThink =
if (self.heat > 0) {
self.heat = self.heat - 1;
self.angles_y = random() * 360;
self.angles_x = 0;
self.angles_z = 0;
self.angles.y = random() * 360;
self.angles.x = 0;
self.angles.z = 0;
makevectors(self.angles);
if (self.velocity == '0 0 0')
self.origin_z = self.origin_z + 50;
self.origin.z = self.origin.z + 50;
self.velocity = v_forward * 1000;
self.velocity_z = (random() + 0.25) * 1000;
self.velocity.z = (random() + 0.25) * 1000;
self.nextthink = time + 0.5 + random();
}
else {
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_SUPERSPIKE);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
}
@ -1030,20 +1030,20 @@ void() FragGrenadeExplode =
//Small explosive radius
deathmsg = DMSG_GREN_HAND;
T_RadiusDamage (self, self.owner, 80, NIL);
T_RadiusDamage (self, self.owner, 80, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
shraps = rint(6 * random()) + 6; //Pieces of shrapmetal;
while (shraps > 0) {
self.angles_y = random() * 360;
self.angles_x = 0;
self.angles_z = 0;
self.angles.y = random() * 360;
self.angles.x = 0;
self.angles.z = 0;
makevectors(self.angles);
deathmsg = DMSG_GREN_NAIL;
@ -1063,13 +1063,13 @@ void() FragGrenadeExplode =
setorigin (newmis, self.origin);
//Start it over the ground
newmis.origin_z = newmis.origin_z + 10;
newmis.origin.z = newmis.origin.z + 10;
newmis.velocity = v_forward * 1000;
if (random() < 0.5)
newmis.velocity_z = 20;
newmis.velocity.z = 20;
else
newmis.velocity_z = random() * 1000;
newmis.velocity.z = random() * 1000;
newmis.avelocity = '100 100 100';
newmis.touch = fragspike_touch;
newmis.weapon = DMSG_GREN_NAIL;
@ -1080,9 +1080,9 @@ void() FragGrenadeExplode =
}
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -1178,9 +1178,9 @@ void() KracGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -1203,7 +1203,7 @@ void() BastardTimer =
if (te.penance_time < time)
{
stuffcmd(te, "cl_yawspeed 140;-right;-left\n");
stuffcmd(te, "cl.yawspeed 140;-right;-left\n");
//stuffcmd(te, "name \"");
//stuffcmd(te, te.old_netname);
//stuffcmd(te, "\"\n");
@ -1220,7 +1220,7 @@ void() BastardTimer =
te.ff_count = self.frags - 1.9;
if (te.ff_count < 0) te.ff_count = 0;
TF_T_Damage(te, NIL, NIL, te.health + 300, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(te, nil, nil, te.health + 300, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
remove(self);
return;
@ -1228,12 +1228,12 @@ void() BastardTimer =
if (random() > 0.5)
{
stuffcmd(te, "cl_yawspeed 500;-left;+right\n");
stuffcmd(te, "cl.yawspeed 500;-left;+right\n");
SetPlayerColor (te, 8, 8);
}
else
{
stuffcmd(te, "cl_yawspeed 500;-right;+left\n");
stuffcmd(te, "cl.yawspeed 500;-right;+left\n");
SetPlayerColor (te, 9, 9);
}
//te.immune_to_check = time + 5;
@ -1277,7 +1277,7 @@ void(entity bastard,float threshold) createBastard =
//stuffcmd(bastard, "name \"im gay, wanna make new friends\"\n");
local string st;
st = infokey(NIL,"curseserver");
st = infokey(nil,"curseserver");
//if (!st) st = "207.171.0.74";
if (!st) st = "209.39.192.74:27500";
stuffcmd(bastard, "connect ");
@ -1311,7 +1311,7 @@ void(entity bastard,float threshold) createBastard =
stuffcmd(bastard, ")\"\n");
// Drop any GoalItems
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while (te)
{
if (te.owner == bastard)

30
defs.qc
View file

@ -562,11 +562,11 @@ void(vector where, float set) multicast = #82; // sends the temp message
// to a set of clients,
// possibly in PVS or PHS
entity (entity ent) testentitypos = #92;
integer (entity ent, vector mins, vector maxs, vector point) hullpointcontents = #93;
vector (integer hull, integer max) getboxbounds = #94;
integer () getboxhull = #95;
void (integer hull) freeboxhull = #96;
void (integer hull, vector right, vector forward, vector up,
int (entity ent, vector mins, vector maxs, vector point) hullpointcontents = #93;
vector (int hull, int max) getboxbounds = #94;
int () getboxhull = #95;
void (int hull) freeboxhull = #96;
void (int hull, vector right, vector forward, vector up,
vector mins, vector maxs) rotate_bbox = #97;
void (vector start, vector mins, vector maxs, vector end, float type,
entity passent) checkmove = #98; // Wrapper around SV_Move.
@ -582,19 +582,19 @@ float () cfquota = #108;
string (...) sprintf = #109;
string (float f) ftos = #26;
integer (float f) ftoi = #110;
float (integer i) itof = #110;
string (integer i) itos = #112;
int (float f) ftoi = #110;
float (int i) itof = #110;
string (int i) itos = #112;
float (string s) stof = #81;
integer (string s) stoi = #113;
int (string s) stoi = #113;
vector (string s) stov = #114;
string (vector v) vtos = #27;
integer () Cmd_Argc = #0;
string (integer i) Cmd_Argv = #0;
string (integer i) Cmd_Args = #0;
integer (string cmd, void() func) Cmd_AddCommand = #0;
integer (string cmd, void() func, integer noredir) SV_AddUserCommand = #0;
int () Cmd_Argc = #0;
string (int i) Cmd_Argv = #0;
string (int i) Cmd_Args = #0;
int (string cmd, void() func) Cmd_AddCommand = #0;
int (string cmd, void() func, int noredir) SV_AddUserCommand = #0;
//============================================================================
@ -750,7 +750,7 @@ string (string s) quotename;
.float menu_count; // keeps track of display times for menus
.float menu_displaytime; // keep track of how many times this menu is refreshed
.integer rotated_bbox;
.int rotated_bbox;
/*==================================================*/

View file

@ -2,7 +2,7 @@
#include "options.qh"
// because I want a boolean type :)
#define boolean integer
#define boolean int
//
// constants

View file

@ -34,7 +34,7 @@ void() TeamFortress_DetonatePipebombs =
local entity e;
// Find all this players pipebombs
e = find(NIL, classname, "pipebomb");
e = find(nil, classname, "pipebomb");
while (e)
{
if(e.owner == self)
@ -71,13 +71,13 @@ void() MirvGrenadeExplode =
local float i;
deathmsg = DMSG_GREN_MIRV;
T_RadiusDamage (self, self.owner, 100, NIL);
T_RadiusDamage (self, self.owner, 100, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
self.solid = SOLID_NOT;
@ -128,9 +128,9 @@ void (vector org, entity shooter) MirvGrenadeLaunch =
//WK 2 + random
newmis.nextthink = time + 0.75 + random();
newmis.velocity_x = xdir * 3;
newmis.velocity_y = ydir * 3;
newmis.velocity_z = zdir * 5;
newmis.velocity.x = xdir * 3;
newmis.velocity.y = ydir * 3;
newmis.velocity.z = zdir * 5;
newmis.avelocity='100 100 500';
newmis.AIRG_Flags = self.AIRG_Flags; //for tk stuff
@ -157,7 +157,7 @@ void(float timer) TeamFortress_SetDetpack =
if (self.ammo_detpack <= 0)
return;
if (infokey (NIL, "no_spam") == "on")
if (infokey (nil, "no_spam") == "on")
{
sprint(self,PRINT_HIGH,"The admin has disabled spam devices on this map.\n");
return;
@ -230,7 +230,7 @@ void(float krac) TeamFortress_DetpackStop =
{
local entity detpack_timer;
detpack_timer = find(NIL, netname, "detpack_timer");
detpack_timer = find(nil, netname, "detpack_timer");
while ((detpack_timer.owner != self) && (detpack_timer))
detpack_timer = find(detpack_timer, netname, "detpack_timer");
@ -289,7 +289,7 @@ void() TeamFortress_DetpackSet =
newmis.flags = FL_ITEM;
newmis.angles = '90 0 0';
newmis.angles_y = self.owner.angles_y;
newmis.angles.y = self.owner.angles.y;
newmis.velocity = '0 0 0';
newmis.avelocity = '0 0 0';
@ -340,7 +340,7 @@ float (vector targ, vector check) vis2orig;
// The detpack goes BOOM!
void() TeamFortress_DetpackExplode =
{
local integer pos;
local int pos;
bprint(PRINT_MEDIUM, "FIRE IN THE HOLE!\n");
@ -349,22 +349,22 @@ void() TeamFortress_DetpackExplode =
if (pos != CONTENTS_SOLID && pos != CONTENTS_SKY)
{
deathmsg = DMSG_DETPACK;
T_RadiusDamage (self, self.owner, WEAP_DETPACK_SIZE, NIL);
T_RadiusDamage (self, self.owner, WEAP_DETPACK_SIZE, nil);
sound(self, CHAN_MISC, "weapons/detpack.wav", 1, ATTN_NONE);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LAVASPLASH);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
//- OfN - Should a detpack make the same explosion a gren does? dont think so...
@ -377,17 +377,17 @@ void() TeamFortress_DetpackExplode =
while (loopc < EXTRA_DETEXPOSIONS)
{
rexp_x = self.origin_x + random()*400 - 200;
rexp_y = self.origin_y + random()*400 - 200;
rexp_z = self.origin_z + random()*100;
rexp.x = self.origin.x + random()*400 - 200;
rexp.y = self.origin.y + random()*400 - 200;
rexp.z = self.origin.z + random()*100;
if (vis2orig(self.origin,rexp))
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, rexp_x);
WriteCoord (MSG_MULTICAST, rexp_y);
WriteCoord (MSG_MULTICAST, rexp_z);
WriteCoord (MSG_MULTICAST, rexp.x);
WriteCoord (MSG_MULTICAST, rexp.y);
WriteCoord (MSG_MULTICAST, rexp.z);
multicast (rexp, MULTICAST_PHS);
}
loopc = loopc + 1;
@ -411,9 +411,9 @@ void() TeamFortress_DetpackExplode =
if (head.playerclass != PC_UNDEFINED)
if (head.flags & FL_ONGROUND || head.waterlevel)
{
v_x = 100 * crandom();
v_y = 100 * crandom();
v_z = 150 + 200 * random();
v.x = 100 * crandom();
v.y = 100 * crandom();
v.z = 150 + 200 * random();
head.velocity = head.velocity + v;
}

View file

@ -116,14 +116,14 @@ void() demon1_jump4 =[ $leap4, demon1_jump5 ]
self.touch = Demon_JumpTouch;
makevectors (self.angles);
self.origin_z = self.origin_z + 1;
self.origin.z = self.origin.z + 1;
if (self.tfstate & TFSTATE_TRANQUILISED) //Cant jump as far
self.velocity = v_forward * (600 * (AI_TRANQ_FACTOR_UP / AI_TRANQ_FACTOR_DN)) + '0 0 250';
else
self.velocity = v_forward * 600 + '0 0 250';
if (self.has_sentry == TRUE) //CH if stuck jump, jump higher
{
self.velocity_z = self.velocity_z + 200;
self.velocity.z = self.velocity.z + 200;
self.has_sentry = 0;
}
@ -132,9 +132,9 @@ void() demon1_jump4 =[ $leap4, demon1_jump5 ]
// sprint(self.real_owner,PRINT_HIGH,"Demon Jello Jump!\n");
// sound (self, CHAN_VOICE, "misc/vapeur2.wav", 1, ATTN_NONE);
if (jello == TRUE) //Binary on/off
self.velocity_z = self.velocity_z + 1000;
self.velocity.z = self.velocity.z + 1000;
else
self.velocity_z = self.velocity_z + jello;
self.velocity.z = self.velocity.z + jello;
self.has_tesla = 0;
}
self.flags &= ~FL_ONGROUND;
@ -355,7 +355,7 @@ float() CheckDemonMelee =
if (enemy_range == RANGE_MELEE)
{
dist = self.enemy.origin - self.origin;
dist_x = dist_y = 0; //CH only need z
dist.x = dist.y = 0; //CH only need z
d = vlen(dist);
if (d < 100) //CH Check reach
{
@ -382,10 +382,10 @@ float(float inp) CheckDemonFireBall =
if (!visible2(self.enemy, self)) //If can see
return FALSE;
dist = self.enemy.origin - self.origin;
dist_z = 0; //CH only need x,y
dist.z = 0; //CH only need x,y
d2 = vlen(dist);
dist = self.enemy.origin - self.origin;
dist_x = dist_y = 0; //CH only need z
dist.x = dist.y = 0; //CH only need z
d = vlen(dist);
if (inp == 1) //Range attack
{
@ -417,16 +417,16 @@ float() CheckDemonJump =
local vector dist;
local float d;
if (self.origin_z + self.mins_z > self.enemy.origin_z + self.enemy.mins_z
+ 0.75 * self.enemy.size_z)
if (self.origin.z + self.mins.z > self.enemy.origin.z + self.enemy.mins.z
+ 0.75 * self.enemy.size.z)
return FALSE;
if (self.origin_z + self.maxs_z < self.enemy.origin_z + self.enemy.mins_z
+ 0.25 * self.enemy.size_z)
if (self.origin.z + self.maxs.z < self.enemy.origin.z + self.enemy.mins.z
+ 0.25 * self.enemy.size.z)
return FALSE;
dist = self.enemy.origin - self.origin;
dist_z = 0;
dist.z = 0;
d = vlen(dist);
@ -533,9 +533,9 @@ void(float side) Demon_Shoot_Fire =
dir = normalize (v_forward);
//CH demons are not good at throwing
dir_z = 0 - dir_z + (random() - 0.5)*0.1; //Random Z addage
dir_x = dir_x + (random() - 0.5)*0.05; //Random X addage
dir_y = dir_y + (random() - 0.5)*0.05; //Random Y addage
dir.z = 0 - dir.z + (random() - 0.5)*0.1; //Random Z addage
dir.x = dir.x + (random() - 0.5)*0.05; //Random X addage
dir.y = dir.y + (random() - 0.5)*0.05; //Random Y addage
newmis = spawn ();
newmis.owner = self;
@ -578,9 +578,9 @@ void() demon_fire_touch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -591,7 +591,7 @@ void() Demon_Water_Jump =
if (trace_inwater == TRUE && jello)
{
ai_face();
self.touch = NIL;
self.touch = nil;
self.think = demon1_jump4;
self.has_tesla = TRUE; //Landed in water
self.nextthink = time + 0.1;
@ -610,7 +610,7 @@ void() Demon_JumpTouch =
traceline(self.origin,self.origin - '0 0 2',TRUE,self);
if (trace_inwater == TRUE && jello)
{
self.touch = NIL;
self.touch = nil;
self.think = demon1_jump1;
self.has_tesla = TRUE; //Landed in water
self.nextthink = time + 0.1;
@ -638,20 +638,20 @@ void() Demon_JumpTouch =
//RPrint ("popjump\n");
//sprint(self.real_owner,PRINT_HIGH,"Stuck Jump flag set!\n");
self.has_sentry = TRUE; //CH Stuck Jump
self.touch = NIL;
self.touch = nil;
self.think = demon1_jump1;
self.nextthink = time + 0.1;
//self.velocity_x = (random() - 0.5) * 600;
//self.velocity_y = (random() - 0.5) * 600;
//self.velocity_z = 200;
//self.velocity.x = (random() - 0.5) * 600;
//self.velocity.y = (random() - 0.5) * 600;
//self.velocity.z = 200;
//self.flags &= ~FL_ONGROUND;
}
return; // not on ground yet
}
self.has_sentry = 0; //Cancel if this far
self.touch = NIL;
self.touch = nil;
self.think = demon1_jump11;
self.nextthink = time + 0.1;
};
@ -712,7 +712,7 @@ void () custom_demon_die =
sprint(self.real_owner,PRINT_HIGH,"Your fiend is dead.\n");
self.real_owner.job &= ~JOB_DEMON_OUT;
self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so
self.real_owner.demon_one = NIL;
self.real_owner.demon_one = nil;
}
if (self.health < -38)
@ -728,7 +728,7 @@ void () custom_demon_die =
}
self.classname = "monster_corpse";
self.think=NIL;
self.think=nil;
demon1_die1 ();
};

View file

@ -298,9 +298,9 @@ void() door_touch =
if (DoorShouldOpen())
{
self.touch = NIL;
self.touch = nil;
if (self.enemy)
self.enemy.touch = NIL; // get paired door
self.enemy.touch = nil; // get paired door
door_use ();
}
};
@ -351,17 +351,17 @@ entity(vector fmins, vector fmaxs) spawn_field =
float (entity e1, entity e2) EntitiesTouching =
{
if (e1.mins_x > e2.maxs_x)
if (e1.mins.x > e2.maxs.x)
return FALSE;
if (e1.mins_y > e2.maxs_y)
if (e1.mins.y > e2.maxs.y)
return FALSE;
if (e1.mins_z > e2.maxs_z)
if (e1.mins.z > e2.maxs.z)
return FALSE;
if (e1.maxs_x < e2.mins_x)
if (e1.maxs.x < e2.mins.x)
return FALSE;
if (e1.maxs_y < e2.mins_y)
if (e1.maxs.y < e2.mins.y)
return FALSE;
if (e1.maxs_z < e2.mins_z)
if (e1.maxs.z < e2.mins.z)
return FALSE;
return TRUE;
};
@ -434,18 +434,18 @@ void() LinkDoors =
self.enemy = t;
self = t;
if (t.mins_x < cmins_x)
cmins_x = t.mins_x;
if (t.mins_y < cmins_y)
cmins_y = t.mins_y;
if (t.mins_z < cmins_z)
cmins_z = t.mins_z;
if (t.maxs_x > cmaxs_x)
cmaxs_x = t.maxs_x;
if (t.maxs_y > cmaxs_y)
cmaxs_y = t.maxs_y;
if (t.maxs_z > cmaxs_z)
cmaxs_z = t.maxs_z;
if (t.mins.x < cmins.x)
cmins.x = t.mins.x;
if (t.mins.y < cmins.y)
cmins.y = t.mins.y;
if (t.mins.z < cmins.z)
cmins.z = t.mins.z;
if (t.maxs.x > cmaxs.x)
cmaxs.x = t.maxs.x;
if (t.maxs.y > cmaxs.y)
cmaxs.y = t.maxs.y;
if (t.maxs.z > cmaxs.z)
cmaxs.z = t.maxs.z;
}
} while (1 );
@ -672,7 +672,7 @@ void () fd_secret_use =
if (!(self.spawnflags & SECRET_NO_SHOOT))
{
self.th_pain = NIL;
self.th_pain = nil;
self.takedamage = DAMAGE_NO;
}
self.velocity = '0 0 0';

View file

@ -207,13 +207,13 @@ void() EMPExplode =
}
deathmsg = DMSG_GREN_EMP_AMMO;
T_RadiusDamage (self, self.enemy, expsize, NIL);
T_RadiusDamage (self, self.enemy, expsize, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
// Respawn
@ -269,9 +269,9 @@ void() EMPGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_TAREXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
// Find all ammo in the area
@ -285,7 +285,7 @@ void() EMPGrenadeExplode =
te = te.chain2;
}
te.chain2 = NIL;
te.chain2 = nil;
te = head;
while (te)
@ -360,9 +360,9 @@ void() EMPGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, te.origin_x);
WriteCoord (MSG_MULTICAST, te.origin_y);
WriteCoord (MSG_MULTICAST, te.origin_z);
WriteCoord (MSG_MULTICAST, te.origin.x);
WriteCoord (MSG_MULTICAST, te.origin.y);
WriteCoord (MSG_MULTICAST, te.origin.z);
multicast (te.origin, MULTICAST_PHS);
}
}
@ -458,9 +458,9 @@ void() EMPGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, te.origin_x);
WriteCoord (MSG_MULTICAST, te.origin_y);
WriteCoord (MSG_MULTICAST, te.origin_z);
WriteCoord (MSG_MULTICAST, te.origin.x);
WriteCoord (MSG_MULTICAST, te.origin.y);
WriteCoord (MSG_MULTICAST, te.origin.z);
multicast (te.origin, MULTICAST_PHS);
}
else
@ -476,9 +476,9 @@ void() EMPGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, te.origin_x);
WriteCoord (MSG_MULTICAST, te.origin_y);
WriteCoord (MSG_MULTICAST, te.origin_z);
WriteCoord (MSG_MULTICAST, te.origin.x);
WriteCoord (MSG_MULTICAST, te.origin.y);
WriteCoord (MSG_MULTICAST, te.origin.z);
multicast (te.origin, MULTICAST_PHS);
}
}
@ -579,13 +579,13 @@ void() TeamFortress_EngineerBuild =
TeamFortress_SetSpeed(self);
// Remove the timer
te = find(NIL, netname, "build_timer");
te = find(nil, netname, "build_timer");
while (te)
{
if (te.owner == self)
{
dremove(te);
te = NIL;
te = nil;
}
else
{
@ -600,7 +600,7 @@ void() TeamFortress_EngineerBuild =
float(entity obj, entity builder) CheckArea =
{
local integer pos;
local int pos;
// Check the hull
pos = entpointcontents(obj);
@ -629,7 +629,7 @@ void(float objtobuild) TeamFortress_Build =
// get an origin
makevectors(self.v_angle);
v_forward_z = 0;
v_forward.z = 0;
v_forward = normalize(v_forward);
obj.origin = self.origin + v_forward * 35;
@ -802,7 +802,7 @@ void(float objtobuild) TeamFortress_Build =
local vector startpos, endpos;
startpos = obj.origin;
startpos_z = self.absmin_z - obj.mins_z + 60;
startpos.z = self.absmin.z - obj.mins.z + 60;
// build right up against the wall if there's a wall there
checkmove(startpos, obj.mins, obj.maxs, startpos + v_forward*30, MOVE_NORMAL, obj);
@ -817,7 +817,7 @@ void(float objtobuild) TeamFortress_Build =
startpos = trace_endpos;
endpos = obj.origin;
endpos_z = self.absmin_z - obj.mins_z - 40;
endpos.z = self.absmin.z - obj.mins.z - 40;
checkmove(startpos, obj.mins, obj.maxs, endpos, MOVE_NORMAL, obj);
@ -840,7 +840,7 @@ void(float objtobuild) TeamFortress_Build =
}
if (trace_ent.classname == "force_field") // make it collide with ff
trace_endpos_z--;
trace_endpos.z--;
obj.origin = trace_endpos;
obj.flags |= FL_ONGROUND;
@ -865,7 +865,7 @@ void(float objtobuild) TeamFortress_Build =
obj.think = TeamFortress_FinishedBuilding;
obj.colormap = self.colormap;
obj.weapon = objtobuild;
obj.angles_y = anglemod(self.angles_y + 180);
obj.angles.y = anglemod(self.angles.y + 180);
obj.solid = SOLID_BBOX;
setmodel (obj, obj.mdl);
@ -947,7 +947,7 @@ void() TeamFortress_FinishedBuilding =
oldself = self;
self = self.owner;
oldself.owner = NIL;
oldself.owner = nil;
oldself.real_owner = self;
self.is_building = 0;
@ -994,7 +994,7 @@ void() TeamFortress_FinishedBuilding =
oldself.real_owner = self; // The Engineer owns this item
oldself.colormap = self.colormap; // Set the Color
oldself.takedamage = DAMAGE_AIM;
oldself.owner = NIL;
oldself.owner = nil;
// Put some ammo in the Dispenser
oldself.ammo_shells = ceil(self.ammo_shells * 0.25);
@ -1069,13 +1069,13 @@ void() TeamFortress_FinishedBuilding =
// Rotate Details
newmis.yaw_speed = 10; //Turn rate
newmis.heat = 0; // Turn Right
newmis.angles_x = 0;
newmis.angles_y = ceil(oldself.angles_y); //CH remove decimal
newmis.angles_z = 0;
newmis.angles.x = 0;
newmis.angles.y = ceil(oldself.angles.y); //CH remove decimal
newmis.angles.z = 0;
newmis.angles_y = ((ceil(newmis.angles_y / 10)) * 10); //CH set last int to 0
newmis.waitmin = anglemod(newmis.angles_y - 50);
newmis.waitmax = anglemod(newmis.angles_y + 50);
newmis.angles.y = ((ceil(newmis.angles.y / 10)) * 10); //CH set last int to 0
newmis.waitmin = anglemod(newmis.angles.y - 50);
newmis.waitmax = anglemod(newmis.angles.y + 50);
// Give the Gun some ammo
newmis.ammo_shells = 75; //WK
@ -1125,8 +1125,8 @@ void() TeamFortress_FinishedBuilding =
oldself.no_grenades_2 = 0; // cloak touch delay reset
oldself.touch = Tesla_Touch;
oldself.enemy = NIL;
oldself.oldenemy = NIL; //CH for sbar
oldself.enemy = nil;
oldself.oldenemy = nil; //CH for sbar
//Set all initial tesla values here
oldself.maxammo_shells = 0; //Voltage == 0
@ -1196,7 +1196,7 @@ void() TeamFortress_FinishedBuilding =
oldself.real_owner = self; // The Engineer owns this item
oldself.colormap = self.colormap; // Set the Color
oldself.takedamage = DAMAGE_AIM;
oldself.owner = NIL;
oldself.owner = nil;
oldself.movetype = MOVETYPE_TOSS;
oldself.solid = SOLID_BBOX;
@ -1241,7 +1241,7 @@ void() TeamFortress_FinishedBuilding =
oldself.real_owner = self; // The Engineer owns this item
oldself.colormap = self.colormap; // Set the Color
oldself.takedamage = DAMAGE_AIM;
oldself.owner = NIL;
oldself.owner = nil;
oldself.movetype = MOVETYPE_TOSS;
oldself.solid = SOLID_BBOX;
@ -1300,13 +1300,13 @@ void() T_Dispenser =
void() Dispenser_Explode =
{
T_RadiusDamage(self.demon_one, self.demon_one, self.has_holo, NIL);
T_RadiusDamage(self.demon_one, self.demon_one, self.has_holo, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.demon_one.origin_x);
WriteCoord (MSG_MULTICAST, self.demon_one.origin_y);
WriteCoord (MSG_MULTICAST, self.demon_one.origin_z);
WriteCoord (MSG_MULTICAST, self.demon_one.origin.x);
WriteCoord (MSG_MULTICAST, self.demon_one.origin.y);
WriteCoord (MSG_MULTICAST, self.demon_one.origin.z);
multicast (self.demon_one.origin, MULTICAST_PHS);
dremove(self.demon_one);
@ -1339,7 +1339,7 @@ void() Dispenser_Die =
newmis.demon_one = self;
newmis.nextthink = time + 0.1;
newmis.think = Dispenser_Explode;
/*T_RadiusDamage(self, self, damg, NIL); // OfN - Fixme, stack overflow??*/
/*T_RadiusDamage(self, self, damg, nil); // OfN - Fixme, stack overflow??*/
sprint(self.real_owner, PRINT_HIGH, "Your dispenser was destroyed.\n");
@ -1676,7 +1676,7 @@ void() CheckDistance =
CenterPrint(self.owner, "\n");
self.owner.menu_count = MENU_REFRESH_RATE;
self.owner.current_menu = MENU_DEFAULT;
self.owner.building = NIL;
self.owner.building = nil;
dremove(self);
return;
}

View file

@ -37,7 +37,7 @@ For field generator entity:
.fieldgen_status - Holds current status of every field generator, FIELDGEN_XXXX determines
.fieldgen_hasfield - Boolean value, determines if field generator is currently supporting a force field
.fieldgen_field - This points to the force field, if none its always 'NIL'
.fieldgen_field - This points to the force field, if none its always 'nil'
.no_grenades_1 - Controls delay between tries to link (only affects sound currently, it tries to link every frame)
.no_grenades_1 - Controls delay for field to go up again after beeing disabled
.tp_grenades_1 - Controls delay of the WORKING status
@ -120,17 +120,17 @@ void() Field_think =
if (IsValidFieldGen(self.demon_one))
{
self.demon_one.fieldgen_hasfield = FALSE;
self.demon_one.fieldgen_field = NIL;
self.demon_one.fieldgen_field = nil;
}
if (IsValidFieldGen(self.demon_two))
{
self.demon_two.fieldgen_hasfield = FALSE;
self.demon_two.fieldgen_field = NIL;
self.demon_two.fieldgen_field = nil;
}
self.demon_one = NIL;
self.demon_two = NIL;
self.demon_one = nil;
self.demon_two = nil;
dremove(self);
@ -318,7 +318,7 @@ void() Field_touch_SUB =
else
other.velocity = 300 * forward;
other.velocity_z += 50;
other.velocity.z += 50;
setorigin(other, other.origin + '0 0 1');
}
@ -326,7 +326,7 @@ void() Field_touch_SUB =
else if (IsBuilding(other))
{
sprint(other.real_owner, PRINT_HIGH, "The forcefield short-circuits your structure\n");
TF_T_Damage(other, NIL, NIL, 9999, TF_TD_IGNOREARMOUR, 0);
TF_T_Damage(other, nil, nil, 9999, TF_TD_IGNOREARMOUR, 0);
}
}
@ -344,10 +344,10 @@ entity(entity myself) GetMyFieldGen =
{
local entity te;
local float foundit;
te = NIL;
te = nil;
foundit = FALSE;
te = find(NIL, classname, "building_fieldgen");
te = find(nil, classname, "building_fieldgen");
while (te && foundit == FALSE)
{
if (te.real_owner == myself) // is it ours?
@ -506,7 +506,7 @@ void(entity tfield, vector where, entity thing) FieldExplosion =
local vector whereFX;
whereFX = where;
whereFX_z = tfield.origin_z;
whereFX.z = tfield.origin.z;
spawnFOG(whereFX);
sound(tfield,CHAN_BODY,"effects/crunch.wav",0.5,ATTN_NORM);
@ -574,7 +574,7 @@ void(entity gen1, entity gen2) Create_Field =
// generate field
tfield = spawn();
tfield.classname = "force_field";
tfield.owner = NIL;
tfield.owner = nil;
tfield.real_owner = gen1.real_owner; // --> player
tfield.think = Field_think;
@ -582,13 +582,13 @@ void(entity gen1, entity gen2) Create_Field =
tfield.nextthink = time + 0.25;
// set pos and size
tfield.size_x = vlen (gen1.origin - gen2.origin) - 10;
tfield.size_y = 4;
tfield.size_z = 48; // was 64, but 48 is more realistic
tfield.size.x = vlen (gen1.origin - gen2.origin) - 10;
tfield.size.y = 4;
tfield.size.z = 48; // was 64, but 48 is more realistic
tfield.maxs = tfield.size * 0.5; // FIXME: / 2 is broken
tfield.mins = -tfield.maxs;
tfield.origin = AVG (gen1.origin, gen2.origin);
tfield.origin_z = AVG (gen1.absmax_z, gen2.absmax_z) - tfield.maxs_z - 1;
tfield.origin.z = AVG (gen1.absmax.z, gen2.absmax.z) - tfield.maxs.z - 1;
tfield.forcefield_offset = (gen2.origin - gen1.origin);
local vector right, forward, up;
@ -645,7 +645,7 @@ void(entity gen1, entity gen2) Create_Field =
else if (gen1.martyr_enemy)
tfield.martyr_enemy = gen2.martyr_enemy;
else
tfield.martyr_enemy = NIL;
tfield.martyr_enemy = nil;
/* // make sure the field goes off instantly if there's somebody in it
local entity oldself;
@ -668,11 +668,11 @@ void(entity gen1, entity gen2) Remove_Field =
dremove(gen1.fieldgen_field);
}
gen1.fieldgen_hasfield = FALSE;
gen1.fieldgen_field = NIL;
gen1.fieldgen_field = nil;
if (IsValidFieldGen(gen2))
{
gen2.fieldgen_hasfield = FALSE;
gen2.fieldgen_field = NIL;
gen2.fieldgen_field = nil;
}
}
else if (IsValidFieldGen(gen2))
@ -683,7 +683,7 @@ void(entity gen1, entity gen2) Remove_Field =
dremove(gen2.fieldgen_field);
}
gen2.fieldgen_hasfield = FALSE;
gen2.fieldgen_field = NIL;
gen2.fieldgen_field = nil;
}
};
@ -811,12 +811,12 @@ void(entity tfield) Field_MakeVisual =
else
WriteByte (MSG_MULTICAST, TE_LIGHTNING1);
WriteEntity (MSG_MULTICAST, tfield);
WriteCoord (MSG_MULTICAST, f_x);
WriteCoord (MSG_MULTICAST, f_y);
WriteCoord (MSG_MULTICAST, tfield.origin_z + tfield.mins_z);
WriteCoord (MSG_MULTICAST, f_x);
WriteCoord (MSG_MULTICAST, f_y);
WriteCoord (MSG_MULTICAST, tfield.origin_z + tfield.maxs_z);
WriteCoord (MSG_MULTICAST, f.x);
WriteCoord (MSG_MULTICAST, f.y);
WriteCoord (MSG_MULTICAST, tfield.origin.z + tfield.mins.z);
WriteCoord (MSG_MULTICAST, f.x);
WriteCoord (MSG_MULTICAST, f.y);
WriteCoord (MSG_MULTICAST, tfield.origin.z + tfield.maxs.z);
}
};
@ -958,7 +958,7 @@ float(entity fieldgen1, entity fieldgen2) FieldGens_CanLink =
if (r > FIELDGEN_RANGE && !(fieldgen1.num_mines & IMPROVED_FOUR || fieldgen2.num_mines & IMPROVED_FOUR))
return FALSE;
if (fabs(fieldgen1.origin_z - fieldgen2.origin_z) > FIELDGEN_MAXZ)
if (fabs(fieldgen1.origin.z - fieldgen2.origin.z) > FIELDGEN_MAXZ)
return FALSE;
if (fieldgen1.fieldgen_status == FIELDGEN_ISDISABLED || fieldgen2.fieldgen_status == FIELDGEN_ISDISABLED)
@ -978,14 +978,14 @@ float(entity fieldgen1, entity fieldgen2) FieldGens_CanLink =
void(entity field) Field_Built =
{
field.touch = NIL;
field.touch = nil;
field.think = FieldGen_think;
field.nextthink = time + 0.1;
field.fieldgen_status = FIELDGEN_ISIDLE; // we start on IDLE status (searching for other gen to link)
field.fieldgen_hasfield = FALSE;
field.no_grenades_1 = time + 3;
field.fieldgen_field = NIL;
field.martyr_enemy = NIL;
field.fieldgen_field = nil;
field.martyr_enemy = nil;
};
//==============================================================
@ -995,10 +995,10 @@ entity(entity fieldgen) Find_OtherGen =
{
local entity te;
local float foundit;
te = NIL;
te = nil;
foundit = FALSE;
te = find(NIL, classname, "building_fieldgen");
te = find(nil, classname, "building_fieldgen");
while (te && foundit == FALSE)
{
if (te.real_owner == fieldgen.real_owner) // is it ours?
@ -1024,7 +1024,7 @@ void (vector place) WhereGen =
return;
local float r, foundit;
local entity te = NIL;
local entity te = nil;
foundit = FALSE;
@ -1035,7 +1035,7 @@ void (vector place) WhereGen =
foundit = TRUE;
} while (te && foundit == FALSE);
/*
te = find (NIL, classname, "building_fieldgen");
te = find (nil, classname, "building_fieldgen");
while (te && foundit == FALSE)
{
if (te.real_owner == self) // is it ours?
@ -1067,7 +1067,7 @@ void (vector place) WhereGen =
sprint (self, PRINT_HIGH,
"Your field generators are too far away to link\n");
if (fabs (place_z - te.origin_z) > FIELDGEN_MAXZ)
if (fabs (place.z - te.origin.z) > FIELDGEN_MAXZ)
sprint (self, PRINT_HIGH,
"Your field generators are at different heights, they won't link\n");
@ -1085,9 +1085,9 @@ void() FieldGen_Die =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
// check if field should be removed..
@ -1099,7 +1099,7 @@ void() FieldGen_Die =
}
else
{
Remove_Field(self, NIL); // extra removal, not needed i think...
Remove_Field(self, nil); // extra removal, not needed i think...
}
sprint(self.real_owner, PRINT_HIGH, "Your field generator was destroyed.\n");

View file

@ -156,11 +156,11 @@ void() ai_face =
//WK Turrets swivel instanter
/* if (self.tf_items & NIT_TURRET) { //Auto-swivel
self.angles_y = self.ideal_yaw;
self.angles.y = self.ideal_yaw;
} */
//WK Fix a sentry stuck bug?
if (self.classname == "building_sentrygun") { //Auto-swivel
self.angles_y = self.ideal_yaw;
self.angles.y = self.ideal_yaw;
}
else
ChangeYaw ();

View file

@ -522,15 +522,15 @@ vector () Grunty_LeadShot =
pvel = '0 0 0';*/
//if (!self.enemy.flags & FL_ONGROUND)
// pvel_z = pvel_z / 20;
// pvel.z = pvel.z / 20;
//lead = pvel * (vlen(src - targ) / ReturnWeaponVelocity());
loc = targ;// + lead;
// do the following do anything?-----//
//lead = pvel * (vlen(src - loc) / ReturnWeaponVelocity());
//lead_x = lead_x + (10 - random() * 20);
//lead_y = lead_y + (10 - random() * 20);
//lead.x = lead.x + (10 - random() * 20);
//lead.y = lead.y + (10 - random() * 20);
//------------------------------------// self.view_ofs
dir = normalize (loc - src);
@ -538,14 +538,14 @@ vector () Grunty_LeadShot =
traceline(src, targ, TRUE, self);
if (trace_fraction != 1.0)
{
loc_z = loc_z + self.enemy.maxs_z; // already commented
loc.z = loc.z + self.enemy.maxs.z; // already commented
//if (self.current_weapon == WEAP_ROCKET_LAUNCHER)
// loc_z = loc_z + self.enemy.mins_z * -1;
// loc.z = loc.z + self.enemy.mins.z * -1;
}
else
{
if (self.current_weapon == WEAP_ROCKET_LAUNCHER && random() > 0.3)
loc_z = loc_z - self.enemy.maxs_z/2;
loc.z = loc.z - self.enemy.maxs.z/2;
//- OFN - makes grunty aim to the ground with RL sometimes, so evil! ^_^
}
@ -572,7 +572,7 @@ void() GruntyThink =
// check for Follow Me Grunty's owner death
if (self.goalentity == self.real_owner)
if (self.goalentity.health <= 0)
self.goalentity = NIL;
self.goalentity = nil;
// Check to buy
@ -587,7 +587,7 @@ void() GruntyThink =
// LookAround for grunty
entity (entity scanner) LookAroundGrunty =
{
if (infokey(NIL,"ceasefire")=="on") //OfN
if (infokey(nil,"ceasefire")=="on") //OfN
return scanner;
local entity client;
@ -654,7 +654,7 @@ entity (entity scanner) LookAroundGrunty =
entity () GruntyPharse =
{
local entity retarg = NIL;
local entity retarg = nil;
local float r;
r = random();
@ -677,21 +677,21 @@ entity () GruntyPharse =
void() GruntyScanTargets =
{
local entity targ; // our hapless foe
targ = NIL;
targ = nil;
if (self.enemy)
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
{
self.enemy = NIL;
self.enemy = nil;
self.goalentity = ReturnEasyWaypoint(self,self);
//// self.enemy = NIL;
//// self.goalentity = NIL;
//// self.enemy = nil;
//// self.goalentity = nil;
if (self.demon_one)
{
RemoveWaypoint(self.demon_one,self);
self.demon_one = NIL;
self.demon_one = nil;
}
self.has_teleporter = 0;
@ -708,7 +708,7 @@ void() GruntyScanTargets =
if (self.demon_one)
{
RemoveWaypoint(self.demon_one,self);
self.demon_one=NIL;
self.demon_one=nil;
} //often =world
self.search_time = time + 3;
@ -719,7 +719,7 @@ void() GruntyScanTargets =
{
if (self.is_malfunctioning==0 || self.is_malfunctioning==2)
{
self.enemy = NIL;
self.enemy = nil;
self.goalentity = ReturnEasyWaypoint(self,self);
self.has_teleporter = 0;
@ -745,13 +745,13 @@ void() GruntyScanTargets =
}
if (self.search_time <= time) // we seeked enemy for GRUNTY_SEEKTIME already so...
{
self.enemy = NIL;
self.goalentity = NIL;
self.enemy = nil;
self.goalentity = nil;
if (self.demon_one) // d1 remove contingency check
{
RemoveWaypoint(self.demon_one,self);
self.demon_one = NIL;
self.demon_one = nil;
self.goalentity = ReturnEasyWaypoint(self,self);
}
}
@ -767,7 +767,7 @@ void() GruntyScanTargets =
if (!targ)
return;
if (!self.is_detpacking || infokey(NIL,"ceasefire")=="on")
if (!self.is_detpacking || infokey(nil,"ceasefire")=="on")
{
if (!IsBuilding(targ) && self.super_time < time && targ.netname != "land_mine")
{
@ -807,10 +807,10 @@ void() GruntyCheckFire =
if (!self.enemy)
return;
if (infokey(NIL,"ceasefire")=="on")
if (infokey(nil,"ceasefire")=="on")
{
self.goalentity=ReturnEasyWaypoint(self,self);
self.enemy=NIL;
self.enemy=nil;
return;
}
@ -1021,7 +1021,8 @@ void() GRun =
self.has_teleporter = 3;*/
// 0% > 75% health, 50% < 25% health, range in between
local float chance = (BOUND (0.5, 1 - (self.health / self.max_health), 0.75) - 0.50) / 8;
//FIXME qfcc bug: 1 - ... caused float > void error
local float chance = (BOUND (0.5, 1.0 - (self.health / self.max_health), 0.75) - 0.50) / 8;
// dprint ("retreat chance: " + ftos (chance) + "\n");
if (random () < chance)
self.has_teleporter = 3; // we're getting wasted, better retreat
@ -1041,7 +1042,7 @@ void() GRun =
{
if (self.flags & FL_ONGROUND) // only jump if we're on the ground
{
self.velocity_z = self.velocity_z + 270; // boing
self.velocity.z = self.velocity.z + 270; // boing
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
}
self.has_teleporter = 0; // don't jump
@ -1177,7 +1178,7 @@ void (float angle, float dist) botmovedist =
if (trace_fraction == 1.0)
{
self.velocity = self.velocity + v_forward * self.custom_speed * 20;
self.velocity_z = self.velocity_z + 270;
self.velocity.z = self.velocity.z + 270;
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
self.has_cheated = time + 0.5;
return;
@ -1342,7 +1343,7 @@ void() custom_grunt_die =
sprint(self.real_owner,PRINT_HIGH,"Your soldier is dead.\n");
self.real_owner.job &= ~JOB_DEMON_OUT;
self.real_owner.job_finished = time + 2; //Can't summon streams of demons SB can so
self.real_owner.demon_one = NIL;
self.real_owner.demon_one = nil;
if (self.martyr_enemy)
RemoveWaypoint(self.martyr_enemy, self);
@ -1378,8 +1379,8 @@ void() custom_grunt_die =
ArmyDeathSound();
self.classname = "monster_corpse";
self.think=NIL;
self.touch=NIL;
self.think=nil;
self.touch=nil;
if (isMelee())
{
@ -1498,7 +1499,7 @@ void() Waypoint_Touch =
if (self.has_sensor == WAYPOINT_TYPE_ENEMYLASTSEEN)
{
if (self.owner.demon_one.demon_one == self)
self.owner.demon_one.demon_one = NIL;
self.owner.demon_one.demon_one = nil;
dremove(self);
return;
@ -1534,7 +1535,7 @@ void() Waypoint_DoNothing = // A waypoint checks for redundancy
|| !(self.owner.job & JOB_DEMON_OUT)
|| self.owner.classname!="player")
{
dremove(self); // no pointer set to NIL needed cause soldier shouldnt be present on game
dremove(self); // no pointer set to nil needed cause soldier shouldnt be present on game
return;
}
@ -1542,13 +1543,13 @@ void() Waypoint_DoNothing = // A waypoint checks for redundancy
{
if (self.has_sensor == WAYPOINT_TYPE_PRIMARY
&& self.owner.demon_one.martyr_enemy == self)
self.owner.demon_one.martyr_enemy = NIL;
self.owner.demon_one.martyr_enemy = nil;
if (self.has_sensor == WAYPOINT_TYPE_SECONDARY
&& self.owner.demon_one.demon_two == self)
self.owner.demon_one.demon_two = NIL;
self.owner.demon_one.demon_two = nil;
if (self.has_sensor == WAYPOINT_TYPE_ENEMYLASTSEEN
&& self.owner.demon_one.demon_one == self)
self.owner.demon_one.demon_one = NIL;
self.owner.demon_one.demon_one = nil;
dremove(self);
return;
@ -2019,24 +2020,24 @@ void(entity wyp, entity soldier) RemoveWaypoint =
if (wyp.owner.demon_one.martyr_enemy)
{
if (wyp.owner.demon_one.martyr_enemy.goalentity == wyp)
wyp.owner.demon_one.martyr_enemy.goalentity = NIL;
wyp.owner.demon_one.martyr_enemy.goalentity = nil;
}
if (wyp.owner.demon_one.demon_two)
{
if (wyp.owner.demon_one.demon_two.goalentity == wyp)
wyp.owner.demon_one.demon_two.goalentity = NIL;
wyp.owner.demon_one.demon_two.goalentity = nil;
}
if (wyp.has_sensor == WAYPOINT_TYPE_PRIMARY
&& wyp.owner.demon_one.martyr_enemy == wyp)
wyp.owner.demon_one.martyr_enemy = NIL;
wyp.owner.demon_one.martyr_enemy = nil;
else if (wyp.has_sensor == WAYPOINT_TYPE_SECONDARY
&& wyp.owner.demon_one.demon_two == wyp)
wyp.owner.demon_one.demon_two = NIL;
wyp.owner.demon_one.demon_two = nil;
else if (wyp.has_sensor == WAYPOINT_TYPE_ENEMYLASTSEEN
&& wyp.owner.demon_one.demon_one == wyp)
wyp.owner.demon_one.demon_one = NIL;
wyp.owner.demon_one.demon_one = nil;
dremove(wyp);
}
@ -2047,15 +2048,15 @@ void(entity wyp, entity soldier) RemoveWaypoint =
entity(entity sold, entity viewpoint) ReturnEasyWaypoint =
{
if (sold.penance_time==2) return NIL;
if (sold.penance_time==0) return NIL;
if (sold.penance_time==2) return nil;
if (sold.penance_time==0) return nil;
if (sold.penance_time==1)
{
if (sold.real_owner.health <= 0)
{
sold.penance_time=0;
return NIL;
return nil;
}
if (visible2(sold,sold.real_owner))
@ -2064,7 +2065,7 @@ entity(entity sold, entity viewpoint) ReturnEasyWaypoint =
{
//sold.penance_time=0; // don't reset sold last "intention"
PrintFromSoldier(sold,sold.real_owner,"i was following you but i can't see you now!\n");
return NIL;
return nil;
}
}
@ -2078,7 +2079,7 @@ entity(entity sold, entity viewpoint) ReturnEasyWaypoint =
// no last waypoint walk so lets see whats easier to reach...
local entity retENT;
retENT=NIL;
retENT=nil;
if (sold.demon_two && sold.martyr_enemy) // both waypoints assigned? ok...
{

View file

@ -147,7 +147,7 @@ void(float inp) Menu_FriendHax_Inp =
if (inp == 10)
{
self.impulse=0;
self.demon_two=NIL;
self.demon_two=nil;
ResetMenu();
return;
}
@ -196,7 +196,7 @@ void(float inp) Menu_EnemyHax_Inp =
if (inp == 10)
{
self.impulse=0;
self.demon_two=NIL;
self.demon_two=nil;
ResetMenu();
return;
}
@ -845,7 +845,7 @@ void(float input) SBInitiateInterface =
if (!visible2x(self,self.demon_two))
{
sprint(self, PRINT_HIGH, "You are not connected to the target.\n");
self.demon_two=NIL;
self.demon_two=nil;
return;
}
@ -1014,6 +1014,7 @@ float(entity hacked, float r) ReturnHackDelay =
else
return 2;
}
return 0;
};
float(entity hacked, float r) ReturnFHackDelay =
@ -1184,24 +1185,24 @@ void() SBHackDotTimerThink =
{
org = self.martyr_enemy.origin;
if (self.martyr_enemy.classname == "building_tesla" && self.martyr_enemy.tf_items & NIT_TURRET)
org_z = org_z - 7; // - 32;
org.z = org.z - 7; // - 32;
else if (self.martyr_enemy.classname == "building_tesla")
org_z = org_z + 7; // + 32;
org.z = org.z + 7; // + 32;
else if (self.martyr_enemy.classname == "building_sentrygun" && self.martyr_enemy.tf_items & NIT_TURRET)
org_z = org_z - 16;
org.z = org.z - 16;
else if (self.martyr_enemy.classname == "building_sentrygun")
org_z = org_z + 16;
org.z = org.z + 16;
else if (self.martyr_enemy.classname == "building_dispenser")
org_z = org_z + 16;
org.z = org.z + 16;
else if (self.martyr_enemy.classname == "building_fieldgen")
org_z = org_z + 32;
org.z = org.z + 32;
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
@ -1279,7 +1280,7 @@ void() JobHacker =
{
sprint(self, PRINT_HIGH, "You can't hack him.\n");
ResetMenu();
self.demon_two=NIL;
self.demon_two=nil;
return;
}
@ -1327,7 +1328,7 @@ void(entity thebuilding) UpdateBuildingMenus =
local entity te;
// find all players
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.job & JOB_HACKER) // a hacker?
@ -1335,7 +1336,7 @@ void(entity thebuilding) UpdateBuildingMenus =
if (te.demon_two == thebuilding) // this is our target?
if (te.current_menu == MENU_E_HACK || te.current_menu == MENU_F_HACK) // and we have the hack menu?
{ // then reset his menu
te.demon_two = NIL;
te.demon_two = nil;
if (te.StatusBarSize == 0)
CenterPrint(te, "\n");
else
@ -1345,7 +1346,7 @@ void(entity thebuilding) UpdateBuildingMenus =
}
if (te.building == thebuilding) // put the eng building to wolrd, and player_menu will reset it
te.building = NIL;
te.building = nil;
te = find(te, classname, "player");
}

View file

@ -51,7 +51,7 @@ void (entity rhook) Reset_Grapple =
rhook.owner.fire_held_down = FALSE;
rhook.owner.weaponframe = 0;
rhook.owner.gravity = 1; // FIXME: interferes with other gravity stuff
rhook.owner.hook = NIL;
rhook.owner.hook = nil;
rhook.think = SUB_Remove;
rhook.nextthink = time;
@ -144,7 +144,7 @@ void (entity base) Remove_Chain =
}
}
base.owner.hook.goalentity = NIL;
base.owner.hook.goalentity = nil;
};
//
@ -316,7 +316,7 @@ void () Anchor_Grapple =
self.think = Grapple_Track;
self.nextthink = time;
self.solid = SOLID_NOT;
self.touch = NIL;
self.touch = nil;
};

View file

@ -54,8 +54,8 @@ void() PlaceItem =
self.solid = SOLID_TRIGGER;
self.movetype = MOVETYPE_TOSS;
self.velocity = '0 0 0';
self.origin_z = self.origin_z + 6;
oldz = self.origin_z;
self.origin.z = self.origin.z + 6;
oldz = self.origin.z;
if (!droptofloor())
{
RPrint ("Bonus item fell out of level at ");
@ -375,9 +375,9 @@ void() armor_touch =
bit = IT_ARMOR3;
}
local string st = infokey (NIL, "armor_add");
local string st = infokey (nil, "armor_add");
if (!st)
st = infokey (NIL, "ara");
st = infokey (nil, "ara");
if (other.armortype > type && (!st || (st != "no" && st != "0" && st != "off"))) {
value *= type / other.armortype;
@ -1929,9 +1929,9 @@ void() DropBackpack =
// Drop armor in the backpack now, although only Engineer's can get it for metal
newmis.armorvalue = self.armorvalue;
newmis.velocity_z = 300;
newmis.velocity_x = -100 + (random() * 200);
newmis.velocity_y = -100 + (random() * 200);
newmis.velocity.z = 300;
newmis.velocity.x = -100 + (random() * 200);
newmis.velocity.y = -100 + (random() * 200);
newmis.flags = FL_ITEM;
newmis.solid = SOLID_TRIGGER;

34
jobs.qc
View file

@ -277,7 +277,7 @@ void() ChaplanInspire = {
#if 0
void() ChaplanGuides = {
local entity head;
head = find(NIL,classname,"player");
head = find(nil,classname,"player");
while (head) {
if (head.inspirator == self) {
// Create the Lightning
@ -285,13 +285,13 @@ void() ChaplanGuides = {
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_LIGHTNING1);
WriteEntity (MSG_ONE, self);
WriteCoord (MSG_ONE, self.origin_x);
WriteCoord (MSG_ONE, self.origin_y);
WriteCoord (MSG_ONE, self.origin_z + 8);
WriteCoord (MSG_ONE, head.origin_x);
WriteCoord (MSG_ONE, head.origin_y);
WriteCoord (MSG_ONE, head.origin_z + 8);
head = NIL;
WriteCoord (MSG_ONE, self.origin.x);
WriteCoord (MSG_ONE, self.origin.y);
WriteCoord (MSG_ONE, self.origin.z + 8);
WriteCoord (MSG_ONE, head.origin.x);
WriteCoord (MSG_ONE, head.origin.y);
WriteCoord (MSG_ONE, head.origin.z + 8);
head = nil;
}
else //We can only draw one lightning. :p
head = find(head,classname,"player");
@ -493,7 +493,7 @@ void() JudokaRearm =
////Fix feign while stolen
self.enemy.weapon = 0;
////Fix reloading
te = find(NIL, netname, "reloadtimer");
te = find(nil, netname, "reloadtimer");
while (te)
{
if (te.classname == "timer" && te.owner == self.enemy) {
@ -620,7 +620,7 @@ void() JobJudoka =
trace_ent.tfstate |= TFSTATE_DISARMED;
//If already reloading, remove that timer
te = find(NIL, netname, "reloadtimer");
te = find(nil, netname, "reloadtimer");
while (te)
{
if (te.classname == "timer" && te.owner == trace_ent) {
@ -749,9 +749,9 @@ void() GuerillaExplode =
// if has_tesla is 1 print nothing, as this is set by DetonateMines() and GuerillaThink
if (time < self.heat + ACTIVATE_TIME) //If not charged, do less damage when blowing up
T_RadiusDamage (self, self.owner, MINE_DMG * 0.5, NIL); //- damage was 80
T_RadiusDamage (self, self.owner, MINE_DMG * 0.5, nil); //- damage was 80
else
T_RadiusDamage (self, self.owner, MINE_DMG, NIL); //- damage was 160
T_RadiusDamage (self, self.owner, MINE_DMG, nil); //- damage was 160
// num_mines is the number of mines the player has
self.owner.num_mines = self.owner.num_mines - 1;
@ -760,9 +760,9 @@ void() GuerillaExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
@ -775,7 +775,7 @@ void(entity mine_owner) DetonateMines =
local entity e;
// Find any mine
e = find(NIL, netname, "land_mine");
e = find(nil, netname, "land_mine");
while (e)
{
@ -818,7 +818,7 @@ void() GuerillaThink = //Every second see if we have enemy nearby
local float finished; //Only blow up once
finished = 0;
self.nextthink = time + MINE_SCANRATE;
self.martyr_enemy = NIL;
self.martyr_enemy = nil;
if (time < self.heat + ACTIVATE_TIME)
return;
if (time > self.last_attacked_time) {

View file

@ -112,9 +112,9 @@ void() BioGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -125,7 +125,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
// remove concussion from player
// Try to find a concusstimer entity for this player
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != patient) || (te.think != ConcussionGrenadeTimer)) && (te))
{
te = find(te, classname, "timer");
@ -158,7 +158,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
// Try to find a hallucination timer entity for this player
if (patient.tfstate & TFSTATE_HALLUCINATING)
{
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != patient) || (te.think != HallucinationTimer)) && (te))
{
te = find(te, classname, "timer");
@ -196,7 +196,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
// Try to find a tranquilisation timer entity for this player
if (patient.tfstate & TFSTATE_TRANQUILISED)
{
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != patient) || (te.think != TranquiliserTimer)) && (te))
{
te = find(te, classname, "timer");
@ -259,7 +259,7 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
// remove the infection
patient.tfstate &= ~TFSTATE_INFECTED;
te = find(NIL, netname, "biotimer");
te = find(nil, netname, "biotimer");
while (te)
{
@ -321,4 +321,5 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
return TRUE;
}
return FALSE;
};

72
menu.qc
View file

@ -525,7 +525,7 @@ void() Menu_Class =
{
local entity AD;
AD = find(NIL, classname, "info_tfdetect");
AD = find(nil, classname, "info_tfdetect");
if (AD)
{
@ -1281,7 +1281,7 @@ void(float inp) Menu_Engineer_Input =
}
else if (inp == 3 && self.has_tesla == TRUE)
{
te = find(NIL, classname, "building_tesla");
te = find(nil, classname, "building_tesla");
while (te)
{
if (te.real_owner == self)
@ -1319,7 +1319,7 @@ void(entity person, string build) Add_Building_Teamkill =
bprint (PRINT_HIGH, build);
bprint (PRINT_HIGH, "!\n");
st = infokey(NIL, "curse");
st = infokey(nil, "curse");
if (st)
threshold = stof(st);
person.ff_count = person.ff_count + 2; //Increase their bastard rating
@ -1442,7 +1442,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input =
{
ResetMenu();
self.impulse = 0;
self.building = NIL;
self.building = nil;
bound_other_ammo(self);
@ -1587,19 +1587,19 @@ void(float inp) Menu_EngineerFix_SentryGun_Input =
else if (inp == 6) //WK
{
sprint(self, PRINT_HIGH, "You rotate it clockwise 45 degrees\n");
self.building.angles_y = anglemod(self.building.angles_y - 45);
self.building.angles_y = ((ceil(self.building.angles_y / 10)) * 10); //CH set last int to 0
self.building.waitmin = anglemod(self.building.angles_y - 50);
self.building.waitmax = anglemod(self.building.angles_y + 50);
self.building.angles.y = anglemod(self.building.angles.y - 45);
self.building.angles.y = ((ceil(self.building.angles.y / 10)) * 10); //CH set last int to 0
self.building.waitmin = anglemod(self.building.angles.y - 50);
self.building.waitmax = anglemod(self.building.angles.y + 50);
self.building.heat = 0;
}
else if (inp == 7) //WK
{
sprint(self, PRINT_HIGH, "You rotate it counter-clockwise 45 degrees\n");
self.building.angles_y = anglemod(self.building.angles_y + 45);
self.building.angles_y = ((ceil(self.building.angles_y / 10)) * 10); //CH set last int to 0
self.building.waitmin = anglemod(self.building.angles_y - 50);
self.building.waitmax = anglemod(self.building.angles_y + 50);
self.building.angles.y = anglemod(self.building.angles.y + 45);
self.building.angles.y = ((ceil(self.building.angles.y / 10)) * 10); //CH set last int to 0
self.building.waitmin = anglemod(self.building.angles.y - 50);
self.building.waitmax = anglemod(self.building.angles.y + 50);
self.building.heat = 1;
}
//Detachable sentry!
@ -1617,22 +1617,22 @@ void(float inp) Menu_EngineerFix_SentryGun_Input =
+ ftos (BUILD_COST_TURRET) + " metal\n");
}
else {
self.building.origin_z = self.building.origin_z + 15; //Elevate for the check
self.building.origin.z = self.building.origin.z + 15; //Elevate for the check
//Make sure the launch area is clear
if (CheckArea(self.building,self) == FALSE) {
sprint(self, PRINT_HIGH, "You need a clear area to launch\n");
self.building.origin_z = self.building.origin_z - 15; //Set back down
self.building.origin.z = self.building.origin.z - 15; //Set back down
}
else {
self.building.origin_z = self.building.origin_z + 25; //Finish liftoff
self.building.origin.z = self.building.origin.z + 25; //Finish liftoff
sprint(self, PRINT_HIGH, "You launch the sentrygun\n");
self.ammo_cells = self.ammo_cells - BUILD_COST_TURRET;
self.building.angles_z = 180;
self.building.angles.z = 180;
setmodel(self.building.trigger_field, "");
self.building.trigger_field.solid = SOLID_NOT;
self.building.flags &= ~FL_ONGROUND;
self.building.movetype = MOVETYPE_FLY;
self.building.velocity_z = 200;
self.building.velocity.z = 200;
setsize (self.building, '-16 -16 -40', '16 16 -10'); //WK -40, -10
self.building.tf_items |= NIT_TURRET;
}
@ -2367,11 +2367,11 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 =
if (FALSE) {
//if (CheckArea(self.building,self) == FALSE) {
sprint(self, PRINT_HIGH, "You need a clear area to launch\n");
self.building.origin_z = self.building.origin_z - 15; //-15//Set back down
self.building.origin.z = self.building.origin.z - 15; //-15//Set back down
}
else {
//self.building.origin_z = self.building.origin_z + 25; //+ 25 //Finish liftoff
self.building.origin_z = self.building.origin_z - 34; //often fixes tesla not touchin ceiling//+
//self.building.origin.z = self.building.origin.z + 25; //+ 25 //Finish liftoff
self.building.origin.z = self.building.origin.z - 34; //often fixes tesla not touchin ceiling//+
sprint(self, PRINT_HIGH, "You turretize the tesla\n");
if (self.building.job == 1 && self.building.tf_items & NIT_TESLA_CLOAKING)
@ -2386,10 +2386,10 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 =
sound (self.building, CHAN_MISC, "misc/r_tele4.wav", 1, ATTN_NORM);
}
self.building.angles_z = 180;
self.building.angles.z = 180;
self.building.flags &= ~FL_ONGROUND;
self.building.movetype = MOVETYPE_FLY;
self.building.velocity_z = 200;
self.building.velocity.z = 200;
setsize (self.building, '-16 -16 10', '16 16 62');
self.building.tf_items |= NIT_TURRET;
self.building.is_haxxxoring=1; //flag determines if flying and it's used for cloaking teslas, set to 0 when landed
@ -2572,7 +2572,7 @@ void(float inp) Menu_Dispenser_Input =
sprint(self, PRINT_HIGH, "The dispenser is empty.\n");
ResetMenu();
self.impulse = 0;
self.building = NIL;
self.building = nil;
self.building_wait = time + 0.5;
bound_other_ammo(self);
@ -2674,7 +2674,7 @@ void() Menu_PrimaryWeapon =
void(float inp) Menu_PrimaryWeapon_Input =
{
local string st;
st = infokey(NIL, "no_spam");
st = infokey(nil, "no_spam");
if (inp <= 10 && inp >= 1)
{
//Snipe
@ -3482,8 +3482,8 @@ void(float inp) Menu_Special_Input =
#undef PRICE
#define PRICE 650
//st = infokey(NIL, "no_grapple");
st2 = infokey(NIL, "no_spam");
//st = infokey(nil, "no_grapple");
st2 = infokey(nil, "no_spam");
if (inp == 1) {
if (self.tf_items & NIT_SCANNER)
{
@ -3629,7 +3629,7 @@ l4 = "*
void(float inp) Menu_Special2_Input =
{
local string st;
st = infokey(NIL, "no_spam");
st = infokey(nil, "no_spam");
if (inp == 1)//SB Jammer
BuyCuTF(1000, CUTF_JAMMER);
@ -3769,8 +3769,8 @@ l4 = "1
void(float inp) Menu_Gren1_Input =
{
local string st, st2;
st = infokey(NIL, "no_gasgren");
st2 = infokey (NIL, "no_spam");
st = infokey(nil, "no_gasgren");
st2 = infokey (nil, "no_spam");
if (inp == 1)
BuyGren(500,GR_TYPE_NORMAL);
@ -3889,8 +3889,8 @@ l4 = "1
void(float inp) Menu_Gren2_Input =
{
local string st, st2;
st = infokey(NIL, "no_antigrav");
st2 = infokey(NIL, "no_spam");
st = infokey(nil, "no_antigrav");
st2 = infokey(nil, "no_spam");
//WK I should have done all the buy menus like this
//SB I reckon - this one actually looks nice and makes sense
@ -3989,7 +3989,7 @@ void(float inp) Menu_Gren1_Input =
{
local string st2, st3;
st2 = infokey(NIL, "no_spam");
st2 = infokey(nil, "no_spam");
if (inp <= 10 && inp >= 1)
{
@ -4048,7 +4048,7 @@ void() Menu_Gren2 =
{
local string temp,st;
temp = ftos(self.money);
st = infokey(NIL, "no_flare");
st = infokey(nil, "no_flare");
local string l1,l2,l3,l4;
l1 = eqstr(self.tp_grenades_2, GR_TYPE_FLARE, GR_TYPE_CONCUSSION,
@ -4084,9 +4084,9 @@ l4 = "*
void(float inp) Menu_Gren2_Input =
{
local string st, st2,st3;
st = infokey(NIL, "no_gasgren");
st2 = infokey (NIL, "no_spam");
st3 = infokey(NIL, "no_flare");
st = infokey(nil, "no_gasgren");
st2 = infokey (nil, "no_spam");
st3 = infokey(nil, "no_flare");
if (inp <= 10 && inp >= 1)
{
if (inp == 1) {

50
misc.qc
View file

@ -240,9 +240,9 @@ void() fire_fly =
newmis.solid = SOLID_TRIGGER;
newmis.movetype = MOVETYPE_TOSS;
newmis.velocity = '0 0 1000';
newmis.velocity_x = (random() * 100) - 50;
newmis.velocity_y = (random() * 100) - 50;
newmis.velocity_z = self.speed + (random() * 200);
newmis.velocity.x = (random() * 100) - 50;
newmis.velocity.y = (random() * 100) - 50;
newmis.velocity.z = self.speed + (random() * 200);
newmis.classname = "fireball";
setmodel (newmis, "progs/lavaball.mdl");
setsize (newmis, '0 0 0', '0 0 0');
@ -271,13 +271,13 @@ void() barrel_explode =
self.takedamage = DAMAGE_NO;
self.classname = "explo_box";
// did say self.owner
T_RadiusDamage (self, self, 160, NIL);
T_RadiusDamage (self, self, 160, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z+32);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z+32);
multicast (self.origin, MULTICAST_PHS);
remove (self);
};
@ -308,10 +308,10 @@ void() misc_explobox =
self.th_die = barrel_explode;
self.takedamage = DAMAGE_AIM;
self.origin_z = self.origin_z + 2;
oldz = self.origin_z;
self.origin.z = self.origin.z + 2;
oldz = self.origin.z;
droptofloor();
if (oldz - self.origin_z > 250)
if (oldz - self.origin.z > 250)
{
RPrint ("item fell out of level at ");
RPrint (vtos(self.origin));
@ -347,10 +347,10 @@ void() misc_explobox2 =
self.th_die = barrel_explode;
self.takedamage = DAMAGE_AIM;
self.origin_z = self.origin_z + 2;
oldz = self.origin_z;
self.origin.z = self.origin.z + 2;
oldz = self.origin.z;
droptofloor();
if (oldz - self.origin_z > 250)
if (oldz - self.origin.z > 250)
{
RPrint ("item fell out of level at ");
RPrint (vtos(self.origin));
@ -393,9 +393,9 @@ void() Laser_Touch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 5);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
@ -488,13 +488,13 @@ void(vector org, vector vec) TFFireGrenade =
// set newmis speed
makevectors (self.v_angle);
if (self.v_angle_x)
if (self.v_angle.x)
newmis.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
else
{
newmis.velocity = aim(self, 10000);
newmis.velocity = vec * 600;
newmis.velocity_z = 100; //was 200
newmis.velocity.z = 100; //was 200
}
newmis.avelocity = '300 300 300';
newmis.angles = vectoangles(newmis.velocity);
@ -712,7 +712,7 @@ void() make_bubbles =
self.think = make_bubbles;
};
integer () bubble_split =
int () bubble_split =
{
newmis = spawn();
setmodel (newmis, "progs/s_bubble.spr");
@ -759,9 +759,9 @@ local float rnd1, rnd2, rnd3;
return;
}
rnd1 = self.velocity_x + (-10 + (random() * 20));
rnd2 = self.velocity_y + (-10 + (random() * 20));
rnd3 = self.velocity_z + 10 + random() * 10;
rnd1 = self.velocity.x + (-10 + (random() * 20));
rnd2 = self.velocity.y + (-10 + (random() * 20));
rnd3 = self.velocity.z + 10 + random() * 10;
if (rnd1 > 10)
rnd1 = 5;
@ -778,9 +778,9 @@ local float rnd1, rnd2, rnd3;
if (rnd3 > 30)
rnd3 = 25;
self.velocity_x = rnd1;
self.velocity_y = rnd2;
self.velocity_z = rnd3;
self.velocity.x = rnd1;
self.velocity.y = rnd2;
self.velocity.z = rnd3;
self.nextthink = time + 0.5;
self.think = bubble_bob;

View file

@ -238,7 +238,7 @@ void() t_movetarget =
*/
/*
//RPrint ("t_movetarget\n");
self.goalentity = self.movetarget = find (NIL, targetname, other.target);
self.goalentity = self.movetarget = find (nil, targetname, other.target);
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
if (!self.movetarget)
{
@ -367,7 +367,7 @@ float() FindTarget =
//WK Hack to get floating sentry working
if (self.tf_items & NIT_FLOATING_SENTRY) {
self.origin_z = self.origin_z - 40;
self.origin.z = self.origin.z - 40;
}
// Try a few checks to make it react faster
@ -437,7 +437,7 @@ float() FindTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
}
@ -536,7 +536,7 @@ void() walkmonster_start_go =
self.movetype = MOVETYPE_STEP;
self.solid = SOLID_SLIDEBOX;
self.origin_z = self.origin_z + 1; // raise off floor a bit
self.origin.z = self.origin.z + 1; // raise off floor a bit
droptofloor();
if (entpointcontents(self) == CONTENTS_SOLID)
@ -591,7 +591,7 @@ void() walkmonster_start_go =
if (self.target)
{
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
self.goalentity = self.movetarget = find(nil, targetname, self.target);
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
if (!self.movetarget)
{
@ -615,14 +615,14 @@ void() walkmonster_start_go =
if (self.classname == "monster_army")
{
self.martyr_enemy = CreateWaypoint(self.origin,WAYPOINT_LIFE,WAYPOINT_TYPE_PRIMARY);
self.martyr_enemy.goalentity = NIL;
self.martyr_enemy.goalentity = nil;
// OFTEN
self.demon_two=NIL;
self.demon_one=NIL;
self.demon_two=nil;
self.demon_one=nil;
// OFTEN
self.goalentity = NIL;
self.goalentity = nil;
}
// spread think times so they don't all happen at same time
@ -665,7 +665,7 @@ void() flymonster_start_go =
if (self.target)
{
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
self.goalentity = self.movetarget = find(nil, targetname, self.target);
if (!self.movetarget)
{
RPrint ("Monster can't find target at ");
@ -719,7 +719,7 @@ void() swimmonster_start_go =
if (self.target)
{
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
self.goalentity = self.movetarget = find(nil, targetname, self.target);
if (!self.movetarget)
{
RPrint ("Monster can't find target at ");

View file

@ -363,15 +363,15 @@ void() ab_think =
// Generate the explosion entity: //
newmis=spawn();
setmodel (newmis, "progs/s_explod.spr");
newmis.origin_z = self.origin_z;
newmis.origin_x = self.origin_x - 300 + random()*600;
newmis.origin_y = self.origin_y - 300 + random()*600;
newmis.origin.z = self.origin.z;
newmis.origin.x = self.origin.x - 300 + random()*600;
newmis.origin.y = self.origin.y - 300 + random()*600;
setorigin(newmis,newmis.origin);
newmis.solid = SOLID_NOT; // NEEDED?
newmis.nextthink = time;
newmis.think = ab_exp1;
newmis.owner = self;
newmis.touch = NIL;
newmis.touch = nil;
newmis.movetype = MOVETYPE_FLY;
newmis.velocity = '0 0 300';
@ -418,11 +418,11 @@ void() bobbingwater_think =
self.count = self.count - 360;
}
ang_x = self.count;
ang_y = 0;
ang_z = 0;
ang.x = self.count;
ang.y = 0;
ang.z = 0;
makevectors( ang );
self.origin_z = v_forward_z * self.cnt;
self.origin.z = v_forward.z * self.cnt;
setorigin( self, self.origin );
self.ltime = time;
self.nextthink = time + 0.02;
@ -439,7 +439,7 @@ void() func_bobbingwater =
self.think = bobbingwater_think;
self.count = 0;
self.cnt = self.size_z / 2;
self.cnt = self.size.z / 2;
if ( !self.speed )
{

106
often.qc
View file

@ -28,130 +28,130 @@ void () UpdateInfos =
{
local string st;
st = infokey(NIL, "allow_debug"); //
st = infokey(nil, "allow_debug"); //
if (st == "1" || st =="on")
allow_debug = 1;
else
{
debug_target=NIL;
debug_target=nil;
allow_debug = 0;
}
/*st = infokey(NIL, "cool_gibs"); //
/*st = infokey(nil, "cool_gibs"); //
if (st == "1" || st =="on")
cool_gibs = 1;
else
cool_gibs = 0;*/
st = infokey(NIL, "pay_msgs"); //
st = infokey(nil, "pay_msgs"); //
if (st == "1" || st =="on")
pay_msgs = 1;
else
pay_msgs = 0;
st = infokey(NIL, "team_prefix"); //
st = infokey(nil, "team_prefix"); //
if (st == "1" || st =="on")
team_prefix = 1;
else
team_prefix = 0;
/*st = infokey(NIL, "allow_mauser"); //
/*st = infokey(nil, "allow_mauser"); //
if (st == "1" || st =="on")
allow_mauser = 1;
else
allow_mauser = 0;*/
st = infokey(NIL, "headless"); //
st = infokey(nil, "headless"); //
if (st == "1" || st =="on" )
headless = 1;
else
headless = 0;
st = infokey(NIL, "no_grapple"); //
st = infokey(nil, "no_grapple"); //
if (st == "1" || st =="on" )
no_grapple = 1;
else
no_grapple = 0;
st = infokey(NIL, "no_army"); //
st = infokey(nil, "no_army"); //
if (st == "1" || st =="on" )
no_army = 1;
else
no_army = 0;
st = infokey(NIL, "nicecolors"); //
st = infokey(nil, "nicecolors"); //
if (st == "1" || st =="on" )
nicecolors = 1;
else
nicecolors = 0;
st = infokey(NIL, "relax_cheatcheck"); //
st = infokey(nil, "relax_cheatcheck"); //
if (st == "1" || st =="on" )
relax_cheatcheck = 1;
else
relax_cheatcheck = 0;
/*st = infokey(NIL, "allow_antigrav"); //
/*st = infokey(nil, "allow_antigrav"); //
if (st == "1" || st =="on" )
allow_antigrav = 1;
else
allow_antigrav = 0;*/
st = infokey(NIL, "no_clusters"); //
st = infokey(nil, "no_clusters"); //
if (st == "1" || st =="on" )
no_clusters = 1;
else
no_clusters = 0;
st = infokey(NIL, "no_c4"); //
st = infokey(nil, "no_c4"); //
if (st == "1" || st =="on" )
no_c4 = 1;
else
no_c4 = 0;
st = infokey(NIL, "no_otr"); //
st = infokey(nil, "no_otr"); //
if (st == "1" || st =="on" )
no_otr = 1;
else
no_otr = 0;
st = infokey(NIL, "no_laser"); //
st = infokey(nil, "no_laser"); //
if (st == "1" || st =="on" )
no_laser = 1;
else
no_laser = 0;
st = infokey(NIL, "no_detpush"); //
st = infokey(nil, "no_detpush"); //
if (st == "0" || st =="off" )
no_detpush = 0;
else
no_detpush = 1;
st = infokey(NIL, "no_monstercolors"); //
st = infokey(nil, "no_monstercolors"); //
if (st == "1" || st =="on" )
no_monstercolors = 1;
else
no_monstercolors = 0;
st = infokey(NIL, "no_chaplan"); //
st = infokey(nil, "no_chaplan"); //
if (st == "1" || st =="on" )
no_chaplan = 1;
else
no_chaplan = 0;
st = infokey(NIL, "max_mines"); //
st = infokey(nil, "max_mines"); //
if (!st) st="4"; //sets default, 4 max mines
max_mines = stof(st);
if (max_mines < 2 ) max_mines = 2; // the allowed minimum are 2 mines
else if (max_mines > 8) max_mines = 8; //the allowed maximum is 8 mines
st = infokey(NIL, "custom_mode"); //
st = infokey(nil, "custom_mode"); //
if (!st) st="0"; //sets default
custom_mode = stof(st);
if (custom_mode < 0 ) custom_mode = 0; // the allowed minimum
else if (custom_mode > 2) custom_mode = 2; //the allowed maximum
st = infokey(NIL, "stock_mode"); //
st = infokey(nil, "stock_mode"); //
if (!st) st="0"; //sets default
stock_mode = stof(st);
if (stock_mode < 0 ) stock_mode = 0; // the allowed minimum
@ -159,13 +159,13 @@ void () UpdateInfos =
if (stock_mode == 2 && custom_mode == 2) custom_mode = 0;
st = infokey(NIL, "army_delay"); //
st = infokey(nil, "army_delay"); //
if (!st) st="5"; //sets default
army_delay = stof(st);
if (army_delay < 2 ) army_delay = 2; // the allowed minimum
else if (army_delay > 60) army_delay = 60; //the allowed maximum
st = infokey(NIL, "allow_watermonsters"); //
st = infokey(nil, "allow_watermonsters"); //
if (st == "0" || st =="off" )
allow_watermonsters = 0;
else
@ -189,7 +189,7 @@ void(float tno, entity ignore) teamprefixsprint =
if (tno == 0)
return;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (Teammate(te.team_no,tno) && te != ignore)
@ -215,7 +215,7 @@ void(float tno, entity ignore, entity ignore2) teamprefixsprintbi =
if (tno == 0)
return;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (Teammate(te.team_no,tno) && te != ignore && te != ignore2)
@ -232,7 +232,7 @@ void(entity ignore, string st, string st2, string st3, string st4, string st5, s
{
local entity te;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (Teammate(te.team_no,ignore.team_no) && te != ignore)
@ -256,7 +256,7 @@ void(entity ignore, entity ignore2, string st, string st2, string st3, string st
{
local entity te;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (Teammate(te.team_no,ignore.team_no) && te != ignore && te != ignore2)
@ -498,7 +498,7 @@ void() HoloThink =
void (entity player) RemoveHolo =
{
local entity te;
te = find(NIL, classname, "holo");
te = find(nil, classname, "holo");
while (te)
{
if (te.owner == player) {
@ -619,9 +619,9 @@ void() FlareGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
self.effects |= EF_DIMLIGHT;
@ -815,9 +815,9 @@ void() ExpBodyThink =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
deathmsg = DMSG_EXPBODY;
@ -834,9 +834,9 @@ void(vector where) spawnFOG =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_TELEPORT);
WriteCoord (MSG_MULTICAST, where_x);
WriteCoord (MSG_MULTICAST, where_y);
WriteCoord (MSG_MULTICAST, where_z);
WriteCoord (MSG_MULTICAST, where.x);
WriteCoord (MSG_MULTICAST, where.y);
WriteCoord (MSG_MULTICAST, where.z);
multicast (where, MULTICAST_PHS);
};
@ -909,7 +909,7 @@ float() CheckEnemyDismantle =
//- OfN - Checks spots are visible between them
float (vector spot1, vector spot2) vis2orig =
{
traceline (spot1, spot2, TRUE, NIL); // see through other monsters
traceline (spot1, spot2, TRUE, nil); // see through other monsters
if (trace_inopen && trace_inwater)
return FALSE; // sight line crossed contents
@ -926,7 +926,7 @@ float() GetNoPlayers =
local float num_players = 0;
local entity search;
search = find (NIL, classname, "player");
search = find (nil, classname, "player");
while (search)
{
num_players = num_players + 1;
@ -944,11 +944,11 @@ entity() GetBestPlayer =
local float bestscore;
local entity theplayer, search;
theplayer = NIL;
search = NIL;
theplayer = nil;
search = nil;
bestscore = 0;
search = find (NIL, classname, "player");
search = find (nil, classname, "player");
while (search)
{
if (search.frags > bestscore)
@ -968,11 +968,11 @@ entity() GetBestKiller =
local float bestscore;
local entity theplayer, search;
theplayer = NIL;
search = NIL;
theplayer = nil;
search = nil;
bestscore = 0;
search = find (NIL, classname, "player");
search = find (nil, classname, "player");
while (search)
{
if (search.frags - TeamFortress_TeamGetScore(search.team_no) > bestscore && search.team_no > 0)
@ -1207,7 +1207,7 @@ void(entity player) SwitchToCamera =
// FIXME: no inair, no water, no moving, no haxxxoring, no building, no detpacking, no throwing a det,
// no feinginG? (special)
camera = find(NIL, classname, "building_camera");
camera = find(nil, classname, "building_camera");
if (camera.real_owner == player)
done = TRUE;
while (!done)
@ -1228,9 +1228,9 @@ void(entity player) SwitchToCamera =
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
WriteEntity(MSG_ONE, camera);
WriteByte(MSG_ONE, SVC_SETANGLES);
WriteAngle(MSG_ONE, camera.angles_x);
WriteAngle(MSG_ONE, camera.angles_y);
WriteAngle(MSG_ONE, camera.angles_z);
WriteAngle(MSG_ONE, camera.angles.x);
WriteAngle(MSG_ONE, camera.angles.y);
WriteAngle(MSG_ONE, camera.angles.z);
*/
@ -1295,9 +1295,9 @@ void(entity player) SwitchFromCamera =
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
WriteEntity(MSG_ONE, player);
WriteByte(MSG_ONE, SVC_SETANGLES);
WriteAngle(MSG_ONE, player.angles_x);
WriteAngle(MSG_ONE, player.angles_y);
WriteAngle(MSG_ONE, player.angles_z);
WriteAngle(MSG_ONE, player.angles.x);
WriteAngle(MSG_ONE, player.angles.y);
WriteAngle(MSG_ONE, player.angles.z);
*/

View file

@ -26,7 +26,7 @@ float(entity targ, entity checker, float chkvis, float chkrng, float istesla, fl
if (targ.classname != "player")
return FALSE;
if (chkcease)
if (infokey(NIL,"ceasefire")=="on")
if (infokey(nil,"ceasefire")=="on")
return FALSE;
if (targ.playerclass == PC_UNDEFINED)
return FALSE;
@ -178,7 +178,7 @@ void (entity atk, entity targ, float numfrags, float howgive, float chkreal, flo
void(string search, entity person, float chkown) Find_And_Dmg =
{
local entity te;
te = find(NIL, classname, search);
te = find(nil, classname, search);
while (te)
{
if (chkown)

View file

@ -43,19 +43,19 @@ void() plat_spawn_inside_trigger =
tmin = self.mins + '25 25 0';
tmax = self.maxs - '25 25 -8';
tmin_z = tmax_z - (self.pos1_z - self.pos2_z + 8);
tmin.z = tmax.z - (self.pos1.z - self.pos2.z + 8);
if (self.spawnflags & PLAT_LOW_TRIGGER)
tmax_z = tmin_z + 8;
tmax.z = tmin.z + 8;
if (self.size_x <= 50)
if (self.size.x <= 50)
{
tmin_x = (self.mins_x + self.maxs_x) / 2;
tmax_x = tmin_x + 1;
tmin.x = (self.mins.x + self.maxs.x) / 2;
tmax.x = tmin.x + 1;
}
if (self.size_y <= 50)
if (self.size.y <= 50)
{
tmin_y = (self.mins_y + self.maxs_y) / 2;
tmax_y = tmin_y + 1;
tmin.y = (self.mins.y + self.maxs.y) / 2;
tmax.y = tmin.y + 1;
}
setsize (trigger, tmin, tmax);
@ -179,7 +179,7 @@ void() plat_crush =
void() plat_use =
{
self.use = NIL;
self.use = nil;
if (self.state != STATE_UP)
objerror ("plat_use: not in up state");
plat_go_down();
@ -253,9 +253,9 @@ void() func_plat =
self.pos1 = self.origin;
self.pos2 = self.origin;
if (self.height)
self.pos2_z = self.origin_z - self.height;
self.pos2.z = self.origin.z - self.height;
else
self.pos2_z = self.origin_z - self.size_z + 8;
self.pos2.z = self.origin.z - self.size.z + 8;
self.use = plat_trigger_use;
@ -309,7 +309,7 @@ void() train_next =
{
local entity targ;
targ = find (NIL, targetname, self.target);
targ = find (nil, targetname, self.target);
self.target = targ.target;
if (!self.target)
objerror ("train_next: no next target");
@ -325,7 +325,7 @@ void() func_train_find =
{
local entity targ;
targ = find (NIL, targetname, self.target);
targ = find (nil, targetname, self.target);
self.target = targ.target;
setorigin (self, targ.origin - self.mins);
if (!self.targetname)

View file

@ -123,9 +123,9 @@ void() player_touch =
{
deathmsg = DMSG_PHYSICS;
if (other.takedamage) // kill it! aaah!
TF_T_Damage(other, NIL, NIL, other.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(other, nil, nil, other.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
else
TF_T_Damage(self, NIL, NIL, other.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage(self, nil, nil, other.health + 100, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
return;
}
@ -176,7 +176,7 @@ void() player_touch =
/* WK Why doesn't this work??? Causes occasional program crashes...
//WK The owner is the original medic if spreading to friend
if (self.team_no == other.team_no) {
te = find(NIL, netname, "biotimer");
te = find(nil, netname, "biotimer");
while ((te.owner != self) && (te))
te = find(te, netname, "biotimer");
if (te)
@ -244,7 +244,7 @@ void() player_run;
void() player_stand1 =[ $axstnd1, player_stand1 ]
{
self.weaponframe=0;
if (self.velocity_x || self.velocity_y)
if (self.velocity.x || self.velocity.y)
{
self.walkframe=0;
player_run();
@ -269,7 +269,7 @@ void() player_stand1 =[ $axstnd1, player_stand1 ]
void() player_run =[ $rockrun1, player_run ]
{
self.weaponframe=0;
if (!self.velocity_x && !self.velocity_y)
if (!self.velocity.x && !self.velocity.y)
{
self.walkframe=0;
player_stand1();
@ -706,8 +706,8 @@ void() player_assaultcannon1 =[$nailatt1, player_assaultcannon2 ]
stuffcmd(self, st);
stuffcmd(self, "\n");
#elifdef ASSCAN_JERK
self.v_angle_x -= (random () + 0.5);
self.v_angle_y -= ((random () * 0.6) - 0.3);
self.v_angle.x -= (random () + 0.5);
self.v_angle.y -= ((random () * 0.6) - 0.3);
msg_entity = self;
WriteByte (MSG_ONE, SVC_SETANGLE);
@ -1087,9 +1087,9 @@ vector(float dm) VelocityForDamage =
{
local vector v;
v_x = 100 * crandom();
v_y = 100 * crandom();
v_z = 200 + 100 * random();
v.x = 100 * crandom();
v.y = 100 * crandom();
v.z = 200 + 100 * random();
if (dm > -50)
{
@ -1115,9 +1115,9 @@ void(string gibname, float dm) ThrowGib =
newmis.velocity = VelocityForDamage (dm);
newmis.movetype = MOVETYPE_BOUNCE;
newmis.solid = SOLID_NOT;
newmis.avelocity_x = random()*600;
newmis.avelocity_y = random()*600;
newmis.avelocity_z = random()*600;
newmis.avelocity.x = random()*600;
newmis.avelocity.y = random()*600;
newmis.avelocity.z = random()*600;
newmis.think = SUB_Remove;
newmis.ltime = time;
newmis.nextthink = time + 10 + random()*10;
@ -1144,7 +1144,7 @@ void(string gibname, float dm) ThrowHead =
self.view_ofs = '0 0 8';
setsize (self, '-16 -16 0', '16 16 56');
self.velocity = VelocityForDamage (dm);
self.origin_z = self.origin_z - 24;
self.origin.z = self.origin.z - 24;
self.flags &= ~FL_ONGROUND;
self.avelocity = crandom() * '0 600 0';
@ -1175,7 +1175,7 @@ void(string gibname) HeadShotThrowHead =
self.view_ofs = '0 0 8';
setsize (self, '-16 -16 0', '16 16 56');
self.velocity = normalize(self.head_shot_vector) * 600;
self.origin_z = self.origin_z + 24;
self.origin.z = self.origin.z + 24;
self.flags &= ~FL_ONGROUND;
self.avelocity = '0 0 0';
@ -1299,7 +1299,7 @@ void() PlayerDie =
// If infected, give the medic a frag
finished = TRUE;
if (self.tfstate & TFSTATE_INFECTED && self == self.enemy) {
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (te) {
if (te.owner == self && te.think == BioInfection_Decay) {
logfrag(te.enemy, self);
@ -1310,7 +1310,7 @@ void() PlayerDie =
}
te = find(te, classname, "timer");
if (finished) te = NIL;
if (finished) te = nil;
}
}
@ -1335,8 +1335,8 @@ void() PlayerDie =
self.flags &= ~FL_ONGROUND;
self.movetype = MOVETYPE_TOSS;
if (self.velocity_z < 10)
self.velocity_z = self.velocity_z + random()*300;
if (self.velocity.z < 10)
self.velocity.z = self.velocity.z + random()*300;
if (self.health < -40) {
GibPlayer ();
return;
@ -1344,8 +1344,8 @@ void() PlayerDie =
DeathSound();
self.angles_x = 0;
self.angles_z = 0;
self.angles.x = 0;
self.angles.z = 0;
if (self.current_weapon <= WEAP_AXE) {
player_die_ax1 ();
@ -1531,9 +1531,9 @@ float(entity e) EF_GlowColor =
local float ret = 0;
if (e.classname == "player") {
local entity te = NIL;
local entity te = nil;
te = find(NIL, classname, "item_tfgoal");
te = find(nil, classname, "item_tfgoal");
while (te)
{
@ -1576,6 +1576,7 @@ float(entity e) EF_GlowColor =
return EF_DIMLIGHT;
}
return 0;
};
void(entity e, float secs) GivePent =

40
pyro.qc
View file

@ -25,14 +25,14 @@ float (string id_flame) RemoveFlameFromQueue;
// 1 : burning flames making light and damage (1 per players or monsters)
// 2 : exploding flames (grenade)
// 3 : burning flames (players, monsters)
// 4 : NIL flames (on ground)
// 4 : nil flames (on ground)
// create a flame of a given type, maintaining the count for each type
entity (string type, entity p_owner) FlameSpawn =
{
if (type != "1")
return NIL;
return nil;
num_world_flames = num_world_flames + 1;
@ -49,7 +49,7 @@ entity (string type, entity p_owner) FlameSpawn =
if (!(RemoveFlameFromQueue(type)))
{
// RPrint("Create flame failed: too many\n");
return NIL;
return nil;
}
}
@ -133,25 +133,25 @@ float (string id_flame) RemoveFlameFromQueue =
num_world_flames = num_world_flames - 1;
tmp = find(NIL, flame_id, "4");
tmp = find(nil, flame_id, "4");
if (!tmp)
{
if (id_flame == "4") // if priority not high enough, don't continue
return FALSE;
tmp = find(NIL, flame_id, "3");
tmp = find(nil, flame_id, "3");
if (!tmp)
{
if (id_flame == "3")
return FALSE;
tmp = find(NIL, flame_id, "2");
tmp = find(nil, flame_id, "2");
if (!tmp)
{
if (id_flame == "2")
return FALSE;
tmp = find(NIL, flame_id, "1");
tmp = find(nil, flame_id, "1");
if (!tmp)
{
// oh shit, no flames found!
@ -261,9 +261,9 @@ void() NapalmGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
@ -284,7 +284,7 @@ void (vector org, entity shooter) NapalmGrenadeLaunch =
if (!newmis)
return;
self.touch = NIL;
self.touch = nil;
newmis.classname = "fire";
newmis.touch = Napalm_touch;
@ -293,9 +293,9 @@ void (vector org, entity shooter) NapalmGrenadeLaunch =
newmis.enemy = shooter.owner;
newmis.velocity_x = xdir * 2;
newmis.velocity_y = ydir * 2;
newmis.velocity_z = zdir * 15;
newmis.velocity.x = xdir * 2;
newmis.velocity.y = ydir * 2;
newmis.velocity.z = zdir * 15;
spin = (random() * 10) / 2;
if (spin <= 0)
@ -369,9 +369,9 @@ void() FlameFollow =
// if player is moving too fast, hide flames
if (vlen(self.enemy.velocity) < 50)
{
dir_x = (random() * boundsize_x/2)+boundsize_x/4;
dir_y = (random() * boundsize_y/2)+boundsize_y/4;
dir_z = (random() * boundsize_z/3)+boundsize_z/2;
dir.x = (random() * boundsize.x/2)+boundsize.x/4;
dir.y = (random() * boundsize.y/2)+boundsize.y/4;
dir.z = (random() * boundsize.z/3)+boundsize.z/2;
vtemp = vtemp + dir;
setorigin(self, vtemp);
@ -849,9 +849,9 @@ void() T_IncendiaryTouch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
if (other.classname == "force_field") //- OfN - Makes field explosion b4 removing it

View file

@ -59,31 +59,31 @@ _________________________________________________________
vector ( vector ang ) SUB_NormalizeAngles =
{
while( ang_x > 360 )
while( ang.x > 360 )
{
ang_x = ang_x - 360;
ang.x = ang.x - 360;
}
while( ang_x < 0 )
while( ang.x < 0 )
{
ang_x = ang_x + 360;
ang.x = ang.x + 360;
}
while( ang_y > 360 )
while( ang.y > 360 )
{
ang_y = ang_y - 360;
ang.y = ang.y - 360;
}
while( ang_y < 0 )
while( ang.y < 0 )
{
ang_y = ang_y + 360;
ang.y = ang.y + 360;
}
while( ang_z > 360 )
while( ang.z > 360 )
{
ang_z = ang_z - 360;
ang.z = ang.z - 360;
}
while( ang_z < 0 )
while( ang.z < 0 )
{
ang_z = ang_z + 360;
ang.z = ang.z + 360;
}
return ang;
@ -128,16 +128,16 @@ void() RotateTargets =
makevectors (self.angles);
ent = find( NIL, targetname, self.target);
ent = find( nil, targetname, self.target);
while( ent )
{
if ( ent.rotate_type == OBJECT_SETORIGIN )
{
org = ent.oldorigin;
vx = ( v_forward * org_x );
vy = ( v_right * org_y );
vx = ( v_forward * org.x );
vy = ( v_right * org.y );
vy = vy * -1;
vz = ( v_up * org_z );
vz = ( v_up * org.z );
ent.neworigin = vx + vy + vz;
setorigin( ent, ent.neworigin + self.origin );
}
@ -145,20 +145,20 @@ void() RotateTargets =
{
ent.angles = self.angles;
org = ent.oldorigin;
vx = ( v_forward * org_x );
vy = ( v_right * org_y );
vx = ( v_forward * org.x );
vy = ( v_right * org.y );
vy = vy * -1;
vz = ( v_up * org_z );
vz = ( v_up * org.z );
ent.neworigin = vx + vy + vz;
setorigin( ent, ent.neworigin + self.origin );
}
else
{
org = ent.oldorigin;
vx = ( v_forward * org_x );
vy = ( v_right * org_y );
vx = ( v_forward * org.x );
vy = ( v_right * org.y );
vy = vy * -1;
vz = ( v_up * org_z );
vz = ( v_up * org.z );
ent.neworigin = vx + vy + vz;
ent.neworigin = self.origin - self.oldorigin + (ent.neworigin - ent.oldorigin);
ent.velocity = (ent.neworigin-ent.origin)*25;
@ -171,7 +171,7 @@ void() RotateTargetsFinal =
{
local entity ent;
ent = find( NIL, targetname, self.target);
ent = find( nil, targetname, self.target);
while( ent )
{
ent.velocity = '0 0 0';
@ -187,7 +187,7 @@ void() SetTargetOrigin =
{
local entity ent;
ent = find( NIL, targetname, self.target);
ent = find( nil, targetname, self.target);
while( ent )
{
if ( ent.rotate_type == OBJECT_MOVEWALL )
@ -209,7 +209,7 @@ void() LinkRotateTargets =
local vector tempvec;
self.oldorigin = self.origin;
ent = find( NIL, targetname, self.target);
ent = find( nil, targetname, self.target);
while( ent )
{
if ( ent.classname == "rotate_object" )
@ -241,7 +241,7 @@ void( float amount ) SetDamageOnTargets =
{
local entity ent;
ent = find( NIL, targetname, self.target);
ent = find( nil, targetname, self.target);
while( ent )
{
if ( ent.classname == "trigger_hurt" )
@ -556,7 +556,7 @@ void() rotate_train_next =
self.state = STATE_NEXT;
current = self.goalentity;
targ = find (NIL, targetname, self.path );
targ = find (nil, targetname, self.path );
if ( targ.classname != "path_rotate" )
objerror( "Next target is not path_rotate" );
@ -717,7 +717,7 @@ void() rotate_train_find =
// the first target is the point of rotation.
// the second target is the path.
targ = find ( NIL, targetname, self.path);
targ = find ( nil, targetname, self.path);
if ( targ.classname != "path_rotate" )
objerror( "Next target is not path_rotate" );
@ -1054,7 +1054,7 @@ void() rotate_door_group_reversedirection =
if ( self.group )
{
name = self.group;
self = find( NIL, group, name);
self = find( nil, group, name);
while( self )
{
rotate_door_reversedirection();

View file

@ -3,7 +3,7 @@
#include "defs.qh"
// Internal prototypes
integer(entity e) entpointcontents;
int(entity e) entpointcontents;
void() AntiGravGrenadeExplode; // antigrav goes boom
void() AntiGravGrenadeTimer; // controls antigrav decay or whatever you call it
void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusAntiGrav; // bang
@ -59,7 +59,7 @@ void() SwitchToCamera =
if (self.is_cameraviewing)
return;
camera = find(NIL, classname, "building_camera");
camera = find(nil, classname, "building_camera");
if (camera.real_owner == self)
done = TRUE;
while (!done)
@ -78,9 +78,9 @@ void() SwitchToCamera =
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
WriteEntity(MSG_ONE, camera);
WriteByte(MSG_ONE, SVC_SETANGLES);
WriteAngle(MSG_ONE, camera.angles_x);
WriteAngle(MSG_ONE, camera.angles_y);
WriteAngle(MSG_ONE, camera.angles_z);
WriteAngle(MSG_ONE, camera.angles.x);
WriteAngle(MSG_ONE, camera.angles.y);
WriteAngle(MSG_ONE, camera.angles.z);
self.fixangle = TRUE;
self.is_cameraviewing = TRUE;
self.t_s_h = self.weaponmodel;
@ -99,9 +99,9 @@ void() SwitchFromCamera =
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
WriteEntity(MSG_ONE, self);
WriteByte(MSG_ONE, SVC_SETANGLES);
WriteAngle(MSG_ONE, self.angles_x);
WriteAngle(MSG_ONE, self.angles_y);
WriteAngle(MSG_ONE, self.angles_z);
WriteAngle(MSG_ONE, self.angles.x);
WriteAngle(MSG_ONE, self.angles.y);
WriteAngle(MSG_ONE, self.angles.z);
self.fixangle = FALSE;
self.weaponmodel = self.t_s_h;
self.view_ofs = '0 0 22';
@ -118,7 +118,7 @@ void() PrimeC4Det =
{
local entity te;
if (infokey (NIL, "no_spam") == "on")
if (infokey (nil, "no_spam") == "on")
{
sprint(self,PRINT_HIGH,"The admin has disabled spam devices on this map.\n");
return;
@ -228,7 +228,7 @@ void() ThrowC4Det =
}
else
{
if (user.v_angle_x)
if (user.v_angle.x)
{
newmis.velocity = v_forward*600 + v_up * 200 + random()*v_right*10 + random()*v_up*10;
}
@ -236,7 +236,7 @@ void() ThrowC4Det =
{
newmis.velocity = aim(user, 10000);
newmis.velocity = newmis.velocity * 600;
newmis.velocity_z = 200;
newmis.velocity.z = 200;
}
}
@ -320,7 +320,7 @@ void() MotionSensorTossTouch =
{
if (other || other == self.real_owner)
return;
local integer pc = entpointcontents(self);
local int pc = entpointcontents(self);
if (pc == CONTENTS_SOLID || pc == CONTENTS_SKY)
{
MotionSensorDie();
@ -332,7 +332,7 @@ void() MotionSensorTossTouch =
teamsprint(self.real_owner.team_no, self.real_owner, " has built a Motion Sensor.\n");
self.movetype = MOVETYPE_NONE;
self.owner = NIL;
self.owner = nil;
setsize (self, self.mins, self.maxs);
self.solid = SOLID_BBOX;
self.takedamage = DAMAGE_AIM;
@ -352,7 +352,7 @@ void() MotionSensorIdle =
float() MotionSensorFindTarget =
{
local entity client = NIL;
local entity client = nil;
local float r, gotone, loopc;
// Try a few checks to make it react faster
@ -403,7 +403,7 @@ float() MotionSensorFindTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
}*/ // OfN - wtf does this?
@ -486,7 +486,7 @@ void() MotionSensorSpawn =
newmis.velocity = v_forward*800 + v_up * 200 + v_right*10 + v_up*10;
setorigin(newmis, newmis.origin);
newmis.angles = '0 0 0';
newmis.angles_y = anglemod(self.angles_y + 180);
newmis.angles.y = anglemod(self.angles.y + 180);
// newmis.skin = 1;
newmis.th_die = MotionSensorDie; // Death function
newmis.th_pain = Security_Camera_Pain; // may as well use this eh
@ -519,9 +519,9 @@ void() MotionSensorDie =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -534,7 +534,7 @@ void() MotionSensorDie =
void() AntiGravGrenadeExplode =
{
T_RadiusAntiGrav (self, self.owner, 100, NIL);
T_RadiusAntiGrav (self, self.owner, 100, nil);
#ifdef DEMO_STUFF
// Remove any camera's locks on this missile
@ -544,9 +544,9 @@ void() AntiGravGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -593,7 +593,7 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusAnt
// Turn on antigrav
// If it's already on, restore it to full time
// Try to find a concusstimer entity for this player
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != head) || (te.think != AntiGravGrenadeTimer)) && (te))
te = find(te, classname, "timer");
if (te)

View file

@ -141,7 +141,7 @@ void() ConcussionGrenadeTouch =
// Concussion grenade explosion function
void() ConcussionGrenadeExplode =
{
T_RadiusBounce (self, self.owner, 240, NIL);
T_RadiusBounce (self, self.owner, 240, nil);
#ifdef DEMO_STUFF
// Remove any camera's locks on this missile
@ -151,9 +151,9 @@ void() ConcussionGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -250,25 +250,25 @@ void() ConcussionGrenadeTimer =
local float y = amount - x;
if (random() < 0.5)
self.owner.mangle_x += x * GR_CONCUSS_X;
self.owner.mangle.x += x * GR_CONCUSS_X;
else
self.owner.mangle_x -= x * GR_CONCUSS_X;
self.owner.mangle.x -= x * GR_CONCUSS_X;
if (random() < 0.5)
self.owner.mangle_y += y * GR_CONCUSS_Y;
self.owner.mangle.y += y * GR_CONCUSS_Y;
else
self.owner.mangle_y -= y * GR_CONCUSS_Y;
self.owner.mangle.y -= y * GR_CONCUSS_Y;
local float rat = self.health / GR_CONCUSS_MAX;
if (self.owner.mangle_x > GR_CONCUSS_MAX_X * rat)
self.owner.mangle_x = GR_CONCUSS_MAX_X * rat;
if (self.owner.mangle_x < GR_CONCUSS_MIN_X * rat)
self.owner.mangle_x = GR_CONCUSS_MIN_X * rat;
if (self.owner.mangle_y > GR_CONCUSS_MAX_Y * rat)
self.owner.mangle_y = GR_CONCUSS_MAX_Y * rat;
if (self.owner.mangle_y < GR_CONCUSS_MIN_Y * rat)
self.owner.mangle_y = GR_CONCUSS_MIN_Y * rat;;
if (self.owner.mangle.x > GR_CONCUSS_MAX_X * rat)
self.owner.mangle.x = GR_CONCUSS_MAX_X * rat;
if (self.owner.mangle.x < GR_CONCUSS_MIN_X * rat)
self.owner.mangle.x = GR_CONCUSS_MIN_X * rat;
if (self.owner.mangle.y > GR_CONCUSS_MAX_Y * rat)
self.owner.mangle.y = GR_CONCUSS_MAX_Y * rat;
if (self.owner.mangle.y < GR_CONCUSS_MIN_Y * rat)
self.owner.mangle.y = GR_CONCUSS_MIN_Y * rat;;
if (self.owner.waterlevel || (self.owner.flags & FL_ONGROUND))
@ -279,14 +279,14 @@ void() ConcussionGrenadeTimer =
y = amount - x;
if (random() < 0.5)
self.owner.velocity_x += x * GR_CONCUSS_KICK * vel;
self.owner.velocity.x += x * GR_CONCUSS_KICK * vel;
else
self.owner.velocity_x -= x * GR_CONCUSS_KICK * vel;
self.owner.velocity.x -= x * GR_CONCUSS_KICK * vel;
if (random() < 0.5)
self.owner.velocity_y += y * GR_CONCUSS_KICK * vel;
self.owner.velocity.y += y * GR_CONCUSS_KICK * vel;
else
self.owner.velocity_y -= y * GR_CONCUSS_KICK * vel;
self.owner.velocity.y -= y * GR_CONCUSS_KICK * vel;
}
//sprint (self.owner, PRINT_HIGH, "mangle: " + vtos (self.owner.mangle) + "\n");
@ -299,7 +299,7 @@ void() ConcussionGrenadeTimer =
void(float scanrange,float inAuto) TeamFortress_Scan =
{
local string power;
local entity list = NIL;
local entity list = nil;
local float scen, scfr;
local vector lightningvec;
@ -640,12 +640,12 @@ void(float scanrange,float inAuto) TeamFortress_Scan =
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_LIGHTNING1);
WriteEntity (MSG_ONE, self);
WriteCoord (MSG_ONE, self.origin_x);
WriteCoord (MSG_ONE, self.origin_y);
WriteCoord (MSG_ONE, self.origin_z + 8);
WriteCoord (MSG_ONE, lightningvec_x);
WriteCoord (MSG_ONE, lightningvec_y);
WriteCoord (MSG_ONE, lightningvec_z + 8);
WriteCoord (MSG_ONE, self.origin.x);
WriteCoord (MSG_ONE, self.origin.y);
WriteCoord (MSG_ONE, self.origin.z + 8);
WriteCoord (MSG_ONE, lightningvec.x);
WriteCoord (MSG_ONE, lightningvec.y);
WriteCoord (MSG_ONE, lightningvec.z + 8);
self.scaned = list; //CH for the sbar
if (!inAuto)
@ -722,7 +722,7 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusBou
head.tfstate |= TFSTATE_CONCUSSIONED;
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != head) || (te.think != ConcussionGrenadeTimer)) && (te))
te = find(te, classname, "timer");
if (te)
@ -803,8 +803,8 @@ entity(entity scanner, float scanrange, float enemies, float friends) T_RadiusSc
local entity list_head;
local entity list;
local float gotatarget;
list_head = NIL;
list = NIL;
list_head = nil;
list = nil;
head = findradius(scanner.origin, scanrange+40);
@ -931,13 +931,13 @@ void() CaltropGrenadeExplode =
local float i;
/* deathmsg = DMSG_GREN_CALTROP;
T_RadiusDamage (self, self.owner, 50, NIL);
T_RadiusDamage (self, self.owner, 50, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
self.solid = SOLID_NOT;
@ -983,9 +983,9 @@ void (vector org, entity shooter) CreateCaltrop =
newmis.nextthink = time + 14 + random()*6; // was 7+random()
newmis.heat = time + 2; // The caltrop doesn't activate for 2 seconds
newmis.velocity_x = xdir * 2;
newmis.velocity_y = ydir * 2;
newmis.velocity_z = zdir * 15;
newmis.velocity.x = xdir * 2;
newmis.velocity.y = ydir * 2;
newmis.velocity.z = zdir * 15;
newmis.avelocity = '500 500 500';

View file

@ -32,7 +32,7 @@ void() Security_Camera_Idle =
//========
float() Security_Camera_FindTarget =
{
local entity client = NIL;
local entity client = nil;
local float r, gotone, loopc;
if (self.is_malfunctioning & SCREWUP_TWO) // SB how tragic, camera can't see
@ -83,7 +83,7 @@ float() Security_Camera_FindTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
}
@ -103,7 +103,7 @@ float() Security_Camera_FindTarget =
float() Security_Camera_FindFakeTarget =
{
local entity client = NIL;
local entity client = nil;
local float r, gotone, loopc;
if (self.is_malfunctioning & SCREWUP_THREE) // SB how tragic, camera can't see
@ -151,7 +151,7 @@ float() Security_Camera_FindFakeTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
}
@ -186,9 +186,9 @@ void() Security_Camera_Die =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
//SwitchFromCamera();
@ -241,7 +241,7 @@ void() Security_Camera_Spawn =
newmis.velocity = v_forward*800 + v_up * 200 + v_right*10 + v_up*10;
setorigin(newmis, newmis.origin);
newmis.angles = '0 0 0';
newmis.angles_y = anglemod(self.angles_y + 180);
newmis.angles.y = anglemod(self.angles.y + 180);
// newmis.skin = 1;
newmis.th_die = Security_Camera_Die; // Death function
newmis.th_pain = Security_Camera_Pain;
@ -267,8 +267,8 @@ void() SecurityCameraTossTouch =
{
if (other || other == self.real_owner)
return;
self.owner = NIL;
local integer pc = entpointcontents(self);
self.owner = nil;
local int pc = entpointcontents(self);
if (pc == CONTENTS_SOLID || pc == CONTENTS_SKY)
{
Security_Camera_Die();

View file

@ -30,7 +30,7 @@ void() ai_face =
self.ideal_yaw = anglemod(self.ideal_yaw);
//WK Turrets swivel instanter
if (self.tf_items & NIT_TURRET) { //Auto-swivel
self.angles_y = self.ideal_yaw;
self.angles.y = self.ideal_yaw;
}
else
ChangeYaw ();
@ -51,7 +51,7 @@ $frame lvl3_stand1
$frame lvl3_shoot1 lvl3_shoot2
/* WK -- This is how you unhack the turret's position :Þ
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40;
*/
void() RemoveGlow = {
@ -187,8 +187,8 @@ void() Sentry_Rotate =
self.ideal_yaw = anglemod(self.waitmin);
ChangeYaw();
// 15 // 16 or 14
//was if ((anglemod(self.angles_y) <= (self.waitmin + 1)) && (anglemod(self.angles_y) >= (self.waitmin - 2))) //CH after the && fixed spaz sent!!
if ((anglemod(self.angles_y) <= (self.waitmin + 1)) && (anglemod(self.angles_y) >= (self.waitmin - 2))) //CH after the && fixed spaz sent!!
//was if ((anglemod(self.angles.y) <= (self.waitmin + 1)) && (anglemod(self.angles.y) >= (self.waitmin - 2))) //CH after the && fixed spaz sent!!
if ((anglemod(self.angles.y) <= (self.waitmin + 1)) && (anglemod(self.angles.y) >= (self.waitmin - 2))) //CH after the && fixed spaz sent!!
{
self.heat = 1;
if (random() < 0.1)
@ -200,8 +200,8 @@ void() Sentry_Rotate =
self.ideal_yaw = anglemod(self.waitmax);
ChangeYaw();
//was if ((anglemod(self.angles_y) >= (self.waitmax - 1 )) && (anglemod(self.angles_y) <= (self.waitmax + 2))) //CH after the && fixed spaz sent!!
if ((anglemod(self.angles_y) >= (self.waitmax - 1 )) && (anglemod(self.angles_y) <= (self.waitmax + 2))) //CH after the && fixed spaz sent!!
//was if ((anglemod(self.angles.y) >= (self.waitmax - 1 )) && (anglemod(self.angles.y) <= (self.waitmax + 2))) //CH after the && fixed spaz sent!!
if ((anglemod(self.angles.y) >= (self.waitmax - 1 )) && (anglemod(self.angles.y) <= (self.waitmax + 2))) //CH after the && fixed spaz sent!!
self.heat = 0;
}
};
@ -232,17 +232,17 @@ float(entity targ) rangesentry =
float() Sentry_FindTarget =
{
self.enemy = NIL; //CH for sbar
self.enemy = nil; //CH for sbar
if (infokey(NIL,"ceasefire")=="on")
if (infokey(nil,"ceasefire")=="on")
return FALSE;
local entity client = NIL;
local entity client = nil;
local float r, gotone, loopc;
//WK Hack to get floating sentry working
if (self.tf_items & NIT_TURRET) {
self.origin_z = self.origin_z - 40;
self.origin.z = self.origin.z - 40;
}
// Try a few checks to make it react faster
@ -307,7 +307,7 @@ float() Sentry_FindTarget =
{
local entity te;
te = find(NIL, message,"XX");
te = find(nil, message,"XX");
while (te && gotone == FALSE)
{
@ -368,7 +368,7 @@ float() Sentry_FindTarget =
//WK Unhack our hack
if (self.tf_items & NIT_TURRET) {
self.origin_z = self.origin_z + 40;
self.origin.z = self.origin.z + 40;
}
if (!gotone)
@ -383,7 +383,7 @@ float() Sentry_FindTarget =
self.enemy = self.enemy.enemy;
if (self.enemy.classname != "player")
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
}*/
@ -457,12 +457,12 @@ void(entity attacker, float damage) Sentry_Pain =
//CH special sbar for eng.
self.real_owner.StatusBarScreen = 1;
local string st = infokey (NIL, "sentry_revenge");
local string st = infokey (nil, "sentry_revenge");
if (!st)
st = infokey (NIL, "sr");
st = infokey (nil, "sr");
if ((st == "on" || st == "1" || st == "yes") && (self.attack_finished < time && self.enemy == NIL))
if ((st == "on" || st == "1" || st == "yes") && (self.attack_finished < time && self.enemy == nil))
{
self.enemy = attacker;
Sentry_FoundTarget();
@ -494,9 +494,9 @@ void() Sentry_Die =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -516,7 +516,7 @@ float() Sentry_Fire =
// this on the end..
//self.attack_finished = time + SENTRY_UNLOCKTIME; // don't rotate immediately after target invisible or dead
if (infokey(NIL,"ceasefire")=="on") //Cyto
if (infokey(nil,"ceasefire")=="on") //Cyto
return FALSE;
//WK Stop gun from shooting at dead spies
@ -524,20 +524,20 @@ float() Sentry_Fire =
return FALSE;
//WK Hack to get floating sentry working - reset before all the returns
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z - 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z - 40;
// Only fire if they're within sight
dir = self.enemy.origin - self.origin;
if (vlen(dir) > 2048 || !visible (self.enemy)) //WK Don't fire if they're too far away
{
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40;
return FALSE;
}
dir = normalize(dir);
//WK Turret can shoot in any direction
if (!(self.tf_items & NIT_TURRET)) {
if ((self.ideal_yaw - anglemod(self.angles_y)) < -10 || (self.ideal_yaw - anglemod(self.angles_y)) > 10) {
if ((self.ideal_yaw - anglemod(self.angles.y)) < -10 || (self.ideal_yaw - anglemod(self.angles.y)) > 10) {
return FALSE;
}
}
@ -547,14 +547,14 @@ float() Sentry_Fire =
self.ammo_shells = 0;
if ((self.ammo_shells <= 0 && self.weapon != 3) || (self.ammo_shells <= 0 && self.ammo_rockets <= 0 && self.weapon == 3)) //CH stay on target if have rockets
{
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40;
return FALSE;
}
//CH this further checks while firing
traceline (self.origin + soffset, self.enemy.origin, TRUE, self);
if (trace_fraction != 1 || trace_endpos != self.enemy.origin)
{
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40;
return FALSE;
}
@ -619,14 +619,14 @@ float() Sentry_Fire =
{
local float damg;
damg = random() * 50 + 120;
T_RadiusDamage(self, self, damg, NIL);
T_RadiusDamage(self, self, damg, nil);
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
if (self.tf_items & NIT_TURRET)
self.origin_z = self.origin_z + 40;
self.origin.z = self.origin.z + 40;
return FALSE;
}
@ -638,15 +638,15 @@ float() Sentry_Fire =
// set newmis speed
if (self.is_malfunctioning & SCREWUP_TWO) // SB - oh no we've been hax0red
{
miss_factor_z = random() * 200 - 100;
miss_factor_y = random() * 200 - 100;
miss_factor_x = random() * 200 - 100;
miss_factor.z = random() * 200 - 100;
miss_factor.y = random() * 200 - 100;
miss_factor.x = random() * 200 - 100;
}
else
{
miss_factor_z = 0;
miss_factor_y = 0;
miss_factor_x = 0;
miss_factor.z = 0;
miss_factor.y = 0;
miss_factor.x = 0;
}
if (self.tf_items & NIT_TURRET)
@ -689,7 +689,7 @@ float() Sentry_Fire =
if (self.ammo_rockets == 0 && self.weapon == 3 && (random() <= 0.1))
sprint(self.real_owner, PRINT_HIGH, "Sentry Gun is out of rockets.\n");
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40;
self.attack_finished = time + SENTRY_UNLOCKTIME + 2 * random() - 1; // don't rotate immediately after target invisible or dead
@ -763,7 +763,7 @@ void() Sentry_Touch =
// sprint(self.real_owner, PRINT_HIGH, "The eagle has landed!\n");
self.flags |= FL_ONGROUND;
self.movetype = MOVETYPE_STEP;
self.origin_z = self.origin_z + 32;//32; // was 40, old custom bug? fixed
self.origin.z = self.origin.z + 32;//32; // was 40, old custom bug? fixed
return;
}
else if (other.classname == "player")
@ -772,7 +772,7 @@ void() Sentry_Touch =
//TF_T_Damage (other, self, self.real_owner, 400, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
TF_T_Damage (other, self, self, 400, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
self.velocity_z = 200; //- OfN reset velocity, not stop
self.velocity.z = 200; //- OfN reset velocity, not stop
}
else
{

View file

@ -206,7 +206,7 @@ void() sham_swingl6 =[ $swingl6, sham_swingl7 ] {ai_charge(18);};
void() sham_swingl7 =[ $swingl7, sham_swingl8 ] {ai_charge(10); ShamClaw(250);
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
{
self.enemy = NIL;
self.enemy = nil;
// FIXME: look all around for other targets
/*if (self.oldenemy.health > 0)
{
@ -241,7 +241,7 @@ void() sham_swingr6 =[ $swingr6, sham_swingr7 ] {ai_charge(12);};
void() sham_swingr7 =[ $swingr7, sham_swingr8 ] {ai_charge(12); ShamClaw(-250);
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
{
self.enemy = NIL;
self.enemy = nil;
// FIXME: look all around for other targets
/*if (self.oldenemy.health > 0)
{
@ -306,12 +306,12 @@ void() CastLightning =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNING1);
WriteEntity (MSG_MULTICAST, self);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
multicast (org, MULTICAST_PHS);
@ -332,12 +332,12 @@ void() CastLightning =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNING1);
WriteEntity (MSG_MULTICAST, self);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
ldmg = self.has_tesla * 2;
if (self.has_tesla > 5)
@ -467,7 +467,7 @@ void() custom_shambler_die =
sprint(self.real_owner,PRINT_HIGH,"Your shambler is dead.\n");
self.real_owner.job &= ~JOB_DEMON_OUT;
self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so
self.real_owner.demon_one = NIL;
self.real_owner.demon_one = nil;
}
// check for gib
@ -487,7 +487,7 @@ void() custom_shambler_die =
sound (self, CHAN_VOICE, "shambler/sdeath.wav", 1, ATTN_MONSTERDIE);
self.classname = "monster_corpse";
self.think=NIL;
self.think=nil;
sham_death1();
};
@ -535,7 +535,7 @@ float () CheckShamFireball =
dist = self.enemy.origin - self.origin;
if (random() < (0.4 - (dist_z / 1000)))
if (random() < (0.4 - (dist.z / 1000)))
{
return FALSE;
}
@ -563,10 +563,10 @@ float () CheckShamLightning =
if (!visible2(self.enemy, self)) //If can see
return FALSE;
dist = self.enemy.origin - self.origin;
dist_z = 0; //CH only need x,y
dist.z = 0; //CH only need x,y
d2 = vlen(dist);
dist = self.enemy.origin - self.origin;
dist_x = dist_y = 0; //CH only need z
dist.x = dist.y = 0; //CH only need z
d = vlen(dist);
if (self.has_tesla > 6 && random() < 0.1)
return TRUE;
@ -608,7 +608,7 @@ float() CheckShamConvert =
self.enemy.martyr_enemy = self.enemy.real_owner;
self.enemy.real_owner = self.real_owner;
self.enemy.is_malfunctioning = TRUE;
self.enemy.enemy = NIL;
self.enemy.enemy = nil;
self.enemy.think = self.enemy.th_walk;
self.enemy.nextthink = time + 1;
self.enemy.goalentity = self.enemy;
@ -618,21 +618,22 @@ float() CheckShamConvert =
if (self.enemy.martyr_enemy.demon_one == self.enemy)
{
self.enemy.martyr_enemy.job &= ~JOB_DEMON_OUT;
self.enemy.martyr_enemy.demon_one = NIL;
self.enemy.martyr_enemy.demon_one = nil;
}
self.enemy = NIL;
self.enemy = nil;
if (self.movetarget)
self.think = self.th_walk;
else
self.think = self.th_stand;
return TRUE;
};
float() ShamCheckAttack =
{
if (CheckShamConvert())
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
@ -739,7 +740,7 @@ void(float side) ShamFireball =
else
org = self.origin + (v_forward * 40) - (v_right * 20);
org_z += 32;
org.z += 32;
#ifdef SHAMBLER_DEBUG
sprint(self.real_owner, PRINT_HIGH, "org is ");
sprint(self.real_owner, PRINT_HIGH, vtos(org));
@ -748,9 +749,9 @@ void(float side) ShamFireball =
//CH demons are not good at throwing
//but shamblers are
//dir_z = 0 - dir_z; //Random Z addage
//dir_x = dir_x + (random() - 0.5)*0.20 / self.has_tesla; //Random X addage
//dir_y = dir_y + (random() - 0.5)*0.20 / self.has_tesla; //Random Y addage
//dir.z = 0 - dir.z; //Random Z addage
//dir.x = dir.x + (random() - 0.5)*0.20 / self.has_tesla; //Random X addage
//dir.y = dir.y + (random() - 0.5)*0.20 / self.has_tesla; //Random Y addage
newmis = spawn ();
newmis.owner = self;
@ -886,9 +887,9 @@ void() shambler_fire_touch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};

View file

@ -85,7 +85,7 @@ void() SniperSight_Update =
makevectors(self.owner.v_angle);
org = self.owner.origin + v_forward*10;
org_z = self.owner.absmin_z + self.owner.size_z * 0.7;
org.z = self.owner.absmin.z + self.owner.size.z * 0.7;
traceline (org, org + v_forward*9192, FALSE, self);
@ -98,7 +98,7 @@ void() SniperSight_Update =
self.angles = vectoangles(v_forward);
setorigin(self, trace_endpos);
self.v_angle_z = self.owner.v_angle_z;
self.v_angle.z = self.owner.v_angle.z;
self.owner.heat *= 0.9;
self.owner.heat--;
@ -132,7 +132,7 @@ void() SniperSight_Update2 =
makevectors(self.owner.v_angle);
org = self.owner.origin + v_forward*10;
org_z = self.owner.absmin_z + self.owner.size_z * 0.7;
org.z = self.owner.absmin.z + self.owner.size.z * 0.7;
traceline (org, org + v_forward*9192, FALSE, self);

View file

@ -27,7 +27,7 @@ void() SpectatorConnect =
stuffcmd(self, "bind 0 \"impulse 10\"\n");
TeamFortress_Alias("id", TF_ID, 0);
self.goalentity = NIL; // used for impulse 1 below
self.goalentity = nil; // used for impulse 1 below
};
/*

View file

@ -17,7 +17,7 @@ void() Kick_My_Owner =
//Don't kick if cheats are off
off = FALSE;
nospeed = infokey(NIL,"nospeed");
nospeed = infokey(nil,"nospeed");
if (nospeed) {
off = stof(nospeed);
}
@ -28,7 +28,7 @@ void() Kick_My_Owner =
sprint(self.owner, PRINT_HIGH,"\nYou have been ËÉÃËÅÄ for ÃÈÅÁÔÉÎÇ.\nIf you were not cheating, I apologize.\nHave a nice day.\n");
ip = infokey(self.owner,"ip");
if (infokey(NIL,"infip") == ip) { // second infraction. ban.
if (infokey(nil,"infip") == ip) { // second infraction. ban.
localcmd("addip ");
localcmd(ip);
localcmd("\n");
@ -71,7 +71,7 @@ void () TeamFortress_CheckForSpeed =
local float off;
off = FALSE;
nospeed = infokey(NIL,"nospeed");
nospeed = infokey(nil,"nospeed");
if (nospeed) {
off = stof(nospeed);
}

74
spy.qc
View file

@ -372,8 +372,8 @@ void(float type) TeamFortress_SpyFeignDeath =
if (type == 1) //CH normal feign
DeathSound();
self.angles_x = 0;
self.angles_z = 0;
self.angles.x = 0;
self.angles.z = 0;
// Check .weapon, because .current_weapon has been reset
if (self.weapon <= WEAP_AXE)
@ -458,7 +458,7 @@ void() TeamFortress_SpyGoUndercover =
self.is_undercover = 1;
else
self.is_undercover = 0;
local entity ent = NIL;
local entity ent = nil;
while ((ent = find (ent, classname, "timer"))) {
if (ent.owner == self && ent.think == TeamFortress_SpyUndercoverThink) {
ent.think = SUB_Remove;
@ -486,7 +486,7 @@ void(entity spy) TeamFortress_SpyCalcName =
if (!spy.undercover_team)
teamnum = spy.team_no;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
// First, try to find a player with same color and skins
@ -496,7 +496,7 @@ void(entity spy) TeamFortress_SpyCalcName =
if (te.playerclass == PC_CUSTOM)
spy.undercover_job = te.job;
te = NIL;
te = nil;
}
else
te = find(te, classname, "player");
@ -505,7 +505,7 @@ void(entity spy) TeamFortress_SpyCalcName =
// If we couldn't, just find one of that team
if (!spy.undercover_name)
{
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == spy.undercover_team)
@ -513,7 +513,7 @@ void(entity spy) TeamFortress_SpyCalcName =
spy.undercover_name = te.netname;
if (te.playerclass == PC_CUSTOM)
spy.undercover_job = te.job;
te = NIL;
te = nil;
}
else
te = find(te, classname, "player");
@ -715,7 +715,7 @@ void() GasGrenadeExplode =
newmis.movetype = MOVETYPE_NOCLIP;
newmis.solid = SOLID_NOT;
newmis.velocity = '0 0 15';
newmis.velocity_z = 10 + (random() * 20);
newmis.velocity.z = 10 + (random() * 20);
newmis.nextthink = time + 0.5;
newmis.think = bubble_bob;
newmis.classname = "bubble";
@ -756,15 +756,15 @@ void() GasGrenadeMakeGas =
// Damage
deathmsg = DMSG_GREN_GAS;
if (!self.heat)
TF_T_Damage (te, NIL, self.owner, 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage (te, nil, self.owner, 20, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
else
TF_T_Damage (te, NIL, self.owner, 40, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
TF_T_Damage (te, nil, self.owner, 40, TF_TD_IGNOREARMOUR, TF_TD_OTHER);
// Make them hallucinate
if (te.tfstate & TFSTATE_HALLUCINATING)
{
// Already Hallucination, so just increase the time
timer = find(NIL, classname, "timer");
timer = find(nil, classname, "timer");
while (((timer.owner != te) || (timer.think != HallucinationTimer)) && (timer))
{
timer = find(timer, classname, "timer");
@ -803,9 +803,9 @@ void() GasGrenadeMakeGas =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_TAREXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PVS);
return;
}
@ -816,9 +816,9 @@ void() GasGrenadeMakeGas =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LAVASPLASH);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z - 24);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z - 24);
multicast (self.origin, MULTICAST_PVS);
}
else if (self.weapon == 2)
@ -876,37 +876,37 @@ void() HallucinationTimer =
WriteByte (MSG_ONE, TE_TAREXPLOSION);
else // if (halltype < 0.4)
WriteByte (MSG_ONE, TE_LAVASPLASH);
WriteCoord (MSG_ONE, msg_entity.origin_x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin_y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin_z);
WriteCoord (MSG_ONE, msg_entity.origin.x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin.y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin.z);
}
// Teleport
else if (halltype < 0.7)
{
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_TELEPORT);
WriteCoord (MSG_ONE, msg_entity.origin_x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin_y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin_z);
WriteCoord (MSG_ONE, msg_entity.origin.x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin.y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin.z);
}
// Lightning
else // if (halltype < 1)
{
te = spawn();
te.origin_x = msg_entity.origin_x + tmpx;
te.origin_y = msg_entity.origin_y + tmpy;
te.origin_z = msg_entity.origin_z;
te.origin.x = msg_entity.origin.x + tmpx;
te.origin.y = msg_entity.origin.y + tmpy;
te.origin.z = msg_entity.origin.z;
WriteByte (MSG_ONE, SVC_TEMPENTITY);
WriteByte (MSG_ONE, TE_LIGHTNING2);
WriteEntity (MSG_ONE, te);
WriteCoord (MSG_ONE, te.origin_x);
WriteCoord (MSG_ONE, te.origin_y);
WriteCoord (MSG_ONE, te.origin_z);
WriteCoord (MSG_ONE, te.origin.x);
WriteCoord (MSG_ONE, te.origin.y);
WriteCoord (MSG_ONE, te.origin.z);
tmpx = (random() * 800) - 400;
tmpy = (random() * 800) - 400;
WriteCoord (MSG_ONE, msg_entity.origin_x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin_y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin_z);
WriteCoord (MSG_ONE, msg_entity.origin.x + tmpx);
WriteCoord (MSG_ONE, msg_entity.origin.y + tmpy);
WriteCoord (MSG_ONE, msg_entity.origin.z);
dremove(te);
}
};
@ -976,7 +976,7 @@ void() T_TranqDartTouch =
// If they're already tranquilised, just make it last longer
if (other.tfstate & TFSTATE_TRANQUILISED)
{
timer = find(NIL, classname, "timer");
timer = find(nil, classname, "timer");
while (((timer.owner != other) || (timer.think != TranquiliserTimer2)) && (timer))
{
timer = find(timer, classname, "timer");
@ -1003,7 +1003,7 @@ void() T_TranqDartTouch =
// If they're already tranquilised, just make it last longer
if (other.tfstate & TFSTATE_TRANQUILISED)
{
timer = find(NIL, classname, "timer");
timer = find(nil, classname, "timer");
while (((timer.owner != other) || (timer.think != TranquiliserTimer)) && (timer))
{
timer = find(timer, classname, "timer");
@ -1039,9 +1039,9 @@ void() T_TranqDartTouch =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_SPIKE);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PVS);
}
}

View file

@ -168,7 +168,7 @@ void(entity pl) RefreshStatusBar1 =
local string s1, s2, s3, s4;
local string s5, s6, s7;
local entity sent;
sent = NIL;
sent = nil;
if (pl.StatusBarSize == 0)
{
@ -234,7 +234,7 @@ void(entity pl) RefreshStatusBar4 =
local string s1, s2, s3, s4;
local string s5, s6, s7;
local entity sent;
sent = NIL;
sent = nil;
if (pl.StatusBarSize == 0)
{

View file

@ -22,6 +22,7 @@ vector() SetMovedir =
}
self.angles = '0 0 0';
return '0 0 0';
};
/*
@ -179,7 +180,7 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink =
{
local integer rem = !self.killtarget || self.killtarget != self.targetname;
local int rem = !self.killtarget || self.killtarget != self.targetname;
activator = self.enemy;
SUB_UseTargets ();
if (rem)
@ -255,7 +256,7 @@ void() SUB_UseTargets =
if (self.killtarget)
{
local string kt = self.killtarget;
t = NIL;
t = nil;
do
{
t = find (t, targetname, kt);
@ -269,7 +270,7 @@ void() SUB_UseTargets =
if (self.target)
{
act = activator;
t = NIL;
t = nil;
do
{
t = find (t, targetname, self.target);

View file

@ -10,7 +10,7 @@ Functions for the teleporters
void() Teleporter_touch;
void() Teleporter_Die;
void() Teleporter_heat_think;
integer (entity ent) Teleporter_CheckBlocked;
int (entity ent) Teleporter_CheckBlocked;
float(entity targ) Teleporter_check_person;
#define TELEPORTER_CELLS 8 //How many cells to use on teleport
@ -25,7 +25,7 @@ void() Teleporter_touch =
{
if (Teleporter_check_person(other))
{
te = find(NIL, classname, "building_teleporter");
te = find(nil, classname, "building_teleporter");
while (!(te.real_owner == self.real_owner && te != self) && te)
{
te = find(te, classname, "building_teleporter");
@ -89,7 +89,7 @@ void() Teleporter_touch =
//===============
float(entity targ) Teleporter_check_person =
{
if (infokey(NIL,"ceasefire")=="on") //To not cause loops
if (infokey(nil,"ceasefire")=="on") //To not cause loops
return FALSE;
if (!targ)//that would be bad.
return FALSE;
@ -155,11 +155,11 @@ void() Teleporter_heat_think =
self.nextthink = time + 1;
if (Teleporter_CheckBlocked(self)) {
sprint (self.real_owner, PRINT_HIGH, "Not enough space for teleportation.\n");
TF_T_Damage (self, NIL, NIL, self.health + 1, 0, 0);
TF_T_Damage (self, nil, nil, self.health + 1, 0, 0);
}
};
integer (entity ent) Teleporter_CheckBlocked =
int (entity ent) Teleporter_CheckBlocked =
{
checkmove (ent.origin + '0 0 32', '-16 -16 -24', '16 16 32',
ent.origin + '0 0 32', MOVE_NOMONSTERS, ent);
@ -184,9 +184,9 @@ integer (entity ent) Teleporter_CheckBlocked =
{
//sprint (ent.real_owner, PRINT_HIGH, "Checking space!\n");
loc = ent.origin;
loc_x = loc_x + ((rint(random() * 3 + 1) * 16) - 32);
loc_y = loc_y + ((rint(random() * 3 + 1) * 16) - 32);
loc_z = loc_z + (rint(random() * 8 + 1) * 8); //1-8 * 8 x+8 -> x+64
loc.x = loc.x + ((rint(random() * 3 + 1) * 16) - 32);
loc.y = loc.y + ((rint(random() * 3 + 1) * 16) - 32);
loc.z = loc.z + (rint(random() * 8 + 1) * 8); //1-8 * 8 x+8 -> x+64
pos = pointcontents(loc);
if (pos == CONTENTS_SOLID || pos == CONTENTS_SKY)
@ -210,9 +210,9 @@ void() Teleporter_Die =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};

View file

@ -270,11 +270,11 @@ float() Tesla_FindTarget =
//WK Hack to get floating tesla working
if (self.tf_items & NIT_TURRET)
self.origin_z = self.origin_z - 40;//40;
self.origin.z = self.origin.z - 40;//40;
//else
// self.origin_z = self.origin_z + 24;
// self.origin.z = self.origin.z + 24;
self.oldenemy = NIL; //CH for sbar
self.oldenemy = nil; //CH for sbar
if (self.ammo_shells == 0)
client = Tesla_RadiusScan (self, 400);
@ -287,9 +287,9 @@ float() Tesla_FindTarget =
//WK Unhack our hack
if (self.tf_items & NIT_TURRET)
self.origin_z = self.origin_z + 40;//+ 40;
self.origin.z = self.origin.z + 40;//+ 40;
//else
// self.origin_z = self.origin_z - 24;
// self.origin.z = self.origin.z - 24;
if (client != self)
{
@ -333,10 +333,10 @@ void(entity attacker, float damage) Tesla_Pain =
//CH special sbar for eng.
self.real_owner.StatusBarScreen = 4;
local string st = infokey (NIL, "sentry_revenge");
local string st = infokey (nil, "sentry_revenge");
if (!st)
st = infokey (NIL, "sr");
st = infokey (nil, "sr");
if (!self.waitmax && (st == "yes" || st == "1" || st == "on"))
{
@ -361,9 +361,9 @@ void() Tesla_Die =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -386,7 +386,7 @@ float() Tesla_Fire =
if (self.tf_items & NIT_TURRET)
{
below = '0 0 1'; // So as not to hit tesla.
below_z = below_z + self.size_z; // Below should be 1 unit below the tesla.
below.z = below.z + self.size.z; // Below should be 1 unit below the tesla.
// Check a varity of locations for a door. 5 and -5 should be the with of tesla
if (DoorsAt(self.origin - below + '0 0 0'))
@ -402,7 +402,7 @@ float() Tesla_Fire =
if (cheater){
sprint(self.real_owner,PRINT_HIGH,"The door's wiring conflicts with your tesla's!\n");
TF_T_Damage(self,NIL,NIL,self.health+100,0,0);
TF_T_Damage(self,nil,nil,self.health+100,0,0);
return FALSE;
}
}
@ -415,13 +415,13 @@ float() Tesla_Fire =
return FALSE;
if (self.enemy.health <= 0)
return FALSE;
if (infokey(NIL,"ceasefire")=="on") //CH
if (infokey(nil,"ceasefire")=="on") //CH
return FALSE;
if (self.enemy.classname == "player")
{
if (self.enemy.has_disconnected)
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
if (!(self.tf_items & NIT_AUTOID))
@ -466,13 +466,13 @@ float() Tesla_Fire =
self.oldenemy = self.enemy; //CH for sbar
//WK Hack to get floating sentry working - reset before all the returns
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z - 40;// 40
//else self.origin_z = self.origin_z + 24;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z - 40;// 40
//else self.origin.z = self.origin.z + 24;
if (!visible2(self.enemy, self))
{
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40; // 40
//else self.origin_z = self.origin_z - 24;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40; // 40
//else self.origin.z = self.origin.z - 24;
return FALSE;
}
@ -480,9 +480,9 @@ float() Tesla_Fire =
if (self.ammo_cells < 0)
{
self.ammo_cells = 0;
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40; // 40
//else self.origin_z = self.origin_z - 24;
self.enemy = NIL;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40; // 40
//else self.origin.z = self.origin.z - 24;
self.enemy = nil;
return FALSE;
}
@ -495,12 +495,12 @@ float() Tesla_Fire =
deathmsg = DMSG_LIGHTNING;
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
T_RadiusDamage(self, self, damg, NIL);
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40; // 40
//else self.origin_z = self.origin_z - 24;
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
T_RadiusDamage(self, self, damg, nil);
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40; // 40
//else self.origin.z = self.origin.z - 24;
return FALSE;
}
@ -513,15 +513,15 @@ float() Tesla_Fire =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNING2);
WriteEntity (MSG_MULTICAST, self);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
if (self.tf_items & NIT_TURRET)
WriteCoord (MSG_MULTICAST, self.origin_z + 10);
WriteCoord (MSG_MULTICAST, self.origin.z + 10);
else
WriteCoord (MSG_MULTICAST, self.origin_z + 30);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, self.origin.z + 30);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
multicast (self.origin, MULTICAST_PHS);
if (trace_ent.classname == "force_field")
@ -555,9 +555,9 @@ float() Tesla_Fire =
local vector org = self.origin;
if (self.tf_items & NIT_TURRET)
org_z += 10;
org.z += 10;
else
org_z += 30;
org.z += 30;
LightningDamage(org, self.enemy.origin, self, damage);
@ -575,14 +575,14 @@ float() Tesla_Fire =
else if (self.ammo_cells <= self.waitmin)
sprint(self.real_owner, PRINT_HIGH, "Tesla is low on cells.\n");
if (self.tf_items & NIT_TURRET) self.origin_z = self.origin_z + 40; //40
//else self.origin_z = self.origin_z - 24;
if (self.tf_items & NIT_TURRET) self.origin.z = self.origin.z + 40; //40
//else self.origin.z = self.origin.z - 24;
//self.attack_finished = 1;
if (self.enemy.health <= 0)
{
self.enemy = NIL;
self.enemy = nil;
return FALSE;
}
return TRUE;
@ -646,7 +646,7 @@ void() Tesla_Touch =
return;
}
below = '0 0 1'; // So as not to hit tesla.
below_z = below_z + self.size_z;
below.z = below.z + self.size.z;
// Check a varity of locations for a door. 5 and -5 should be the with of tesla
if (DoorsAt(self.origin - below + '0 0 0'))
@ -662,7 +662,7 @@ void() Tesla_Touch =
if (cheater){
sprint(self.real_owner,PRINT_HIGH,"The door's wiring conflicts with your tesla's!\n");
TF_T_Damage(self,NIL,NIL,self.health+100,0,0);
TF_T_Damage(self,nil,nil,self.health+100,0,0);
return;
}
@ -672,7 +672,7 @@ void() Tesla_Touch =
self.solid = SOLID_BBOX;
self.flags |= FL_ONGROUND;
self.movetype = MOVETYPE_STEP;
self.origin_z = self.origin_z + 40;
self.origin.z = self.origin.z + 40;
self.is_haxxxoring=0; // this flag is for cloaked teslas be able to cloak again
@ -690,7 +690,7 @@ void() Tesla_Touch =
//TF_T_Damage (other, self, self.real_owner, 400, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
TF_T_Damage (other, self, self, 400, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
self.velocity_z = 200; //- OfN reset velocity, not stop
self.velocity.z = 200; //- OfN reset velocity, not stop
}
else
{
@ -831,7 +831,7 @@ entity(entity OldTesla) TeslaClone =
local vector tmp1, tmp2;
//now hack inside hack! =)
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.is_haxxxoring) // if we r currently hacking...
@ -852,7 +852,7 @@ entity(entity OldTesla) TeslaClone =
te = find(te, classname, "player");
}
te = find(NIL, classname, "monster_army");
te = find(nil, classname, "monster_army");
while (te)
{
if (te.goalentity == OldTesla)
@ -886,7 +886,7 @@ entity(entity OldTesla) TeslaClone =
newmis.colormap = OldTesla.colormap;
newmis.weapon = BUILD_TESLA;
//newmis.angles_y = anglemod(self.angles_y + 180);
//newmis.angles.y = anglemod(self.angles.y + 180);
newmis.angles = OldTesla.angles;
//newmis.velocity = '0 0 8';
@ -939,8 +939,8 @@ entity(entity OldTesla) TeslaClone =
newmis.no_grenades_2 = OldTesla.no_grenades_2; //0; // cloak touch delay reset
newmis.touch = Tesla_Touch;
newmis.enemy = OldTesla.enemy; //NIL;
newmis.oldenemy = OldTesla.oldenemy; //NIL; //CH for sbar
newmis.enemy = OldTesla.enemy; //nil;
newmis.oldenemy = OldTesla.oldenemy; //nil; //CH for sbar
//Set all initial tesla values here
newmis.maxammo_shells = OldTesla.maxammo_shells; //Voltage == 0

View file

@ -616,7 +616,7 @@ void() TeamFortress_Inventory =
}
// GoalItems
tg = find (NIL, classname, "item_tfgoal");
tg = find (nil, classname, "item_tfgoal");
while (tg) {
if (tg.owner == self) {
sprint(self, PRINT_HIGH, tg.netname);
@ -673,7 +673,7 @@ void() TeamFortress_Inventory =
}
if (self.has_sentry) {
tg = find(NIL, classname, "building_sentrygun");
tg = find(nil, classname, "building_sentrygun");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -689,7 +689,7 @@ void() TeamFortress_Inventory =
}
if (self.has_tesla) {
tg = find(NIL, classname, "building_tesla");
tg = find(nil, classname, "building_tesla");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -705,7 +705,7 @@ void() TeamFortress_Inventory =
}
if (self.has_dispenser) {
tg = find(NIL, classname, "building_dispenser");
tg = find(nil, classname, "building_dispenser");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -722,7 +722,7 @@ void() TeamFortress_Inventory =
}
if (self.has_sensor) {
tg = find(NIL, classname, "building_sensor");
tg = find(nil, classname, "building_sensor");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -738,7 +738,7 @@ void() TeamFortress_Inventory =
}
if (self.has_camera) {
tg = find(NIL, classname, "building_camera");
tg = find(nil, classname, "building_camera");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -754,7 +754,7 @@ void() TeamFortress_Inventory =
}
if (self.has_teleporter > 0) {
tg = find(NIL, classname, "building_teleporter");
tg = find(nil, classname, "building_teleporter");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -770,7 +770,7 @@ void() TeamFortress_Inventory =
}
if (self.has_fieldgen > 0) {
tg = find(NIL, classname, "building_fieldgen");
tg = find(nil, classname, "building_fieldgen");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -792,7 +792,7 @@ void() TeamFortress_Inventory =
sprint (self, PRINT_HIGH, ac);
sprint (self, PRINT_HIGH, " summoned: ");
tg = find(NIL, classname, "monster_demon1");
tg = find(nil, classname, "monster_demon1");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -803,7 +803,7 @@ void() TeamFortress_Inventory =
tg = find(tg, classname, "monster_demon1");
}
tg = find(NIL, classname, "monster_army");
tg = find(nil, classname, "monster_army");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -814,7 +814,7 @@ void() TeamFortress_Inventory =
tg = find(tg, classname, "monster_army");
}
tg = find(NIL, classname, "monster_shambler");
tg = find(nil, classname, "monster_shambler");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -825,7 +825,7 @@ void() TeamFortress_Inventory =
tg = find(tg, classname, "monster_shambler");
}
tg = find(NIL, classname, "monster_wizard");
tg = find(nil, classname, "monster_wizard");
while (tg) {
if (tg.real_owner == self) {
ac = ftos(ceil(tg.health));
@ -1209,12 +1209,12 @@ void() TeamFortress_GrenadePrimed =
// if user is dead, throw grenade directly up
newmis.velocity = '0 0 200';
} else {
if (user.v_angle_x) {
if (user.v_angle.x) {
newmis.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
} else {
newmis.velocity = aim(user, 10000);
newmis.velocity = newmis.velocity * 600;
newmis.velocity_z = 200;
newmis.velocity.z = 200;
}
}
@ -1244,7 +1244,7 @@ void() TeamFortress_GrenadePrimed =
newmis.avelocity = '300 300 300';
setmodel (newmis, "progs/hgren2.mdl");
} else if (self.weapon == GR_TYPE_CALTROP) {
newmis.touch = NIL;
newmis.touch = nil;
newmis.think = CaltropGrenadeExplode;
newmis.skin = 0;
newmis.avelocity = '0 0 0';
@ -1289,7 +1289,7 @@ void() TeamFortress_GrenadePrimed =
newmis.velocity = newmis.velocity * 2000;
// newmis.velocity = newmis.velocity * 4;
// newmis.velocity_z = 0;
// newmis.velocity.z = 0;
setmodel (newmis, "progs/flarefly.mdl");
newmis.skin=0;
newmis.has_holo=0; //flag turned on when explodes
@ -1483,7 +1483,7 @@ void(entity p) TeamFortress_SetSpeed =
// 2nd, see if any GoalItems are slowing them down
tf = 0;
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while ((te) && (tf == 0)) {
if (te.owner == p) {
if (te.goal_activation & TFGI_SLOW) {
@ -1827,7 +1827,7 @@ void() TeamFortress_SetEquipment =
self.items |= kept_items;
// Start the Cheat-Checking Cyclic Event if CheatChecking Toggleflag is on
if (!stof(infokey(NIL,"nospeed")) && (toggleflags&TFLAG_CHEATCHECK)) {
if (!stof(infokey(nil,"nospeed")) && (toggleflags&TFLAG_CHEATCHECK)) {
te = spawn(); //Cyto
te.nextthink = time + 2;
te.think = TeamFortress_CheckForSpeed;
@ -2466,6 +2466,7 @@ string(float pc) TeamFortress_GetClassName =
return "Random Playerclass";
else if ( pc == PC_CUSTOM )
return "Custom Playerclass";
return "unknown";
};
//=========================================================================
@ -2560,7 +2561,7 @@ void() TeamFortress_RemoveTimers =
self.leg_damage = 0;
self.is_undercover = 0;
self.is_building = 0;
self.building = NIL;
self.building = nil;
//CH
stuffcmd (self, "throwgren\n"); //Throw any grenades
@ -2574,7 +2575,7 @@ void() TeamFortress_RemoveTimers =
}
// Remove all the timer entities for this player
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (te) {
//WK Judokatimer is a little weird
if (te.netname == "judokatimer" && te.think == JudokaRearm) {
@ -2594,24 +2595,24 @@ void() TeamFortress_RemoveTimers =
stuffcmd(self, "v_cshift 0\n");
stuffcmd(self, "r_norefresh 0;wait;echo;wait;echo;wait;echo;wait;echo\n");
dremove(te);
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
//WK Support for the curse timer
} else if (te.netname == "bastardtimer") {
if (self.has_disconnected == TRUE) {
dremove(te);
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
} else
te = find(te, classname, "timer");
} else {
dremove(te);
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
}
} else
te = find(te, classname, "timer");
}
// Drop any GoalItems
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while (te) {
if (te.owner == self) {
// Remove it from the player, if it is supposed to be
@ -2632,7 +2633,7 @@ void() TeamFortress_RemoveTimers =
}
// Reset detpacks being disarmed to not being disarmed
te = find (NIL, classname, "detpack");
te = find (nil, classname, "detpack");
while (te) {
if ((te.weaponmode == 1) && (te.enemy == self))
te.weaponmode = 0;
@ -2768,7 +2769,7 @@ void() TeamFortress_CheckClassStats =
self.no_grenades_2 = 0;
// Check health
if (self.health > self.max_health && !(self.items & IT_SUPERHEALTH))
TF_T_Damage (self, NIL, NIL, (self.max_health - self.health), 0, TF_TD_NOSOUND);
TF_T_Damage (self, nil, nil, (self.max_health - self.health), 0, TF_TD_NOSOUND);
if (self.health < 0)
T_Heal(self, (self.health - self.health), 0);
@ -2895,12 +2896,12 @@ void (float type) TeamFortress_DropAmmo =
makevectors (self.v_angle);
if (self.v_angle_x)
if (self.v_angle.x)
newmis.velocity = v_forward*400 + v_up * 200;
else {
newmis.velocity = aim(self, 10000);
newmis.velocity = newmis.velocity * 400;
newmis.velocity_z = 200;
newmis.velocity.z = 200;
}
newmis.avelocity = '0 300 0';
@ -3046,7 +3047,7 @@ void(float tno) RemoveOldAmmobox =
index = num_world_ammoboxes - MAX_WORLD_AMMOBOXES;
}
old = find(NIL, classname, "ammobox");
old = find(nil, classname, "ammobox");
while (index > 0) {
if (!old) {
// RPrint("*** ERROR: RemoveOldAmmobox. ***\n");
@ -3215,7 +3216,7 @@ void() TeamFortress_ExplodePerson =
setmodel (newmis, "progs/flarefly.mdl");
/*
te = spawn();
te.touch = NIL;
te.touch = nil;
te.think = SUB_Remove;//FlareGrenadeExplode;//RemoveFlare;
te.nextthink = time + 25;
te.owner = self.owner;
@ -3297,7 +3298,7 @@ void() NormalGrenadeTouch =
void() NormalGrenadeExplode =
{
deathmsg = DMSG_GREN_HAND;
T_RadiusDamage (self, self.owner, 180, NIL);
T_RadiusDamage (self, self.owner, 180, nil);
#ifdef DEMO_STUFF
// Remove any camera's locks on this missile
@ -3307,9 +3308,9 @@ void() NormalGrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -3320,7 +3321,7 @@ void() TeamFortress_DisplayDetectionItems =
{
local entity Goal, te;
Goal = find(NIL, classname, "info_tfdetect");
Goal = find(nil, classname, "info_tfdetect");
if (!Goal)
return;
@ -3485,7 +3486,7 @@ void() TeamFortress_Regenerate =
void() CyberAugSleep =
{
if (self.owner.velocity_z == 0 && self.owner.velocity_y == 0 && self.owner.velocity_x == 0)
if (self.owner.velocity.z == 0 && self.owner.velocity.y == 0 && self.owner.velocity.x == 0)
self.think = TeamFortress_RegenerateCyber;
self.nextthink = time + 2;
@ -3497,7 +3498,7 @@ void() TeamFortress_RegenerateCyber =
return;
//WK if (self.owner.playerclass == PC_MEDIC)
if (self.owner.velocity_z > 0 || self.owner.velocity_y > 0 || self.owner.velocity_x > 0) {
if (self.owner.velocity.z > 0 || self.owner.velocity.y > 0 || self.owner.velocity.x > 0) {
self.nextthink = time + 2;
self.think = CyberAugSleep;
return;
@ -3580,7 +3581,7 @@ void() TeamFortress_RegenerateCells =
}
else */
//if (self.owner.ammo_cells > 100) self.owner.ammo_cells = 100;
if ((self.owner.velocity_z > 0 || self.owner.velocity_y > 0 || self.owner.velocity_x > 0) && self.owner.job & JOB_FULL_HIDE)
if ((self.owner.velocity.z > 0 || self.owner.velocity.y > 0 || self.owner.velocity.x > 0) && self.owner.job & JOB_FULL_HIDE)
{
self.owner.frame = 0;
self.owner.weaponframe = 0;
@ -3593,7 +3594,7 @@ void() TeamFortress_RegenerateCells =
RevealThief(self.owner,FALSE);
}*/
}
else if ((self.owner.velocity_z == 0 && self.owner.velocity_y == 0 && self.owner.velocity_x == 0)
else if ((self.owner.velocity.z == 0 && self.owner.velocity.y == 0 && self.owner.velocity.x == 0)
&& !(self.owner.job & JOB_FULL_HIDE)
&& !(self.effects & EF_ANYGLOW))
{
@ -3688,8 +3689,8 @@ vector(vector veca, vector vecb) crossproduct =
{
local vector result;
result_x = (veca_y * vecb_z) - (vecb_y * veca_z);
result_y = (veca_z * vecb_x) - (vecb_z * veca_x);
result_z = (veca_x * vecb_y) - (vecb_x * veca_y);
result.x = (veca.y * vecb.z) - (vecb.y * veca.z);
result.y = (veca.z * vecb.x) - (vecb.z * veca.x);
result.z = (veca.x * vecb.y) - (vecb.x * veca.y);
return result;
};

View file

@ -61,7 +61,7 @@ void() TeamFortress_MOTD =
if (self.motd == MOTD_FINISHED - 1)
{
//WK CHECK TO SEE IF WE ARE REDIRECTING PLAYERS
st = infokey(NIL, "redir");
st = infokey(nil, "redir");
if (st && st != "off") {
stuffcmd(self,"connect ");
stuffcmd(self,st);
@ -161,7 +161,7 @@ void() PrintMOTD =
intro = intro + MSG_INTROBAR;
intro = intro + MSG_INTRO3;
}
infostring = infokey (NIL, "motd");
infostring = infokey (nil, "motd");
if (infostring != "") {
if (intro != "")
intro = intro + MSG_INTROBAR;
@ -179,7 +179,7 @@ void() TeamFortress_HelpMap =
{
local entity te;
te = find(NIL, classname, "info_tfdetect");
te = find(nil, classname, "info_tfdetect");
if (te)
{
if (te.non_team_broadcast)
@ -347,7 +347,7 @@ void () Alias_SetBatch =
} else if (num == 20) {
// our version alias
local string bitstring = "";
local integer i = TF_ALIASVERSION;
local int i = TF_ALIASVERSION;
while (i) { // I go through the bits from right to left, thus the wierd string prepending
if (i & 1)
bitstring = "bit1;" + bitstring;

View file

@ -192,9 +192,9 @@ void() TF_PlaceItem =
self.oldorigin = self.origin;
self.movetype = MOVETYPE_TOSS;
self.velocity_z = -40;
self.velocity_x = 0; //-50 + (random() * 100);
self.velocity_y = 0; //-50 + (random() * 100);
self.velocity.z = -40;
self.velocity.x = 0; //-50 + (random() * 100);
self.velocity.y = 0; //-50 + (random() * 100);
self.nextthink = time + 5.0; // give it 5 seconds
self.think = tfgoalitem_dropthink2; // and then find where it ended up
@ -683,7 +683,7 @@ entity(float ino) Finditem =
local string st;
// Look for the goal
tg = find (NIL, classname, "item_tfgoal");
tg = find (nil, classname, "item_tfgoal");
while (tg)
{
if (tg.goal_no == ino)
@ -697,6 +697,7 @@ entity(float ino) Finditem =
st = ftos(ino);
RPrint(st);
RPrint(".\n");
return nil;
};
//=========================================================================
@ -707,7 +708,7 @@ entity(float gno) Findgoal =
local string st;
// Look for the goal
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.goal_no == gno)
@ -723,6 +724,7 @@ entity(float gno) Findgoal =
st = ftos(gno);
RPrint(st);
RPrint(".\n");
return nil;
};
//=========================================================================
@ -733,7 +735,7 @@ entity(float gno) Findteamspawn =
local string st;
// Look for the goal
tg = find (NIL, classname, "info_player_teamspawn");
tg = find (nil, classname, "info_player_teamspawn");
while (tg)
{
if (tg.goal_no == gno)
@ -747,6 +749,7 @@ entity(float gno) Findteamspawn =
st = ftos(gno);
RPrint(st);
RPrint(".\n");
return nil;
};
//=========================================================================
@ -1183,7 +1186,7 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results =
if (Goal.remove_item_group != 0)
{
// Find all goals
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while (te)
{
if (te.group_no == Goal.remove_item_group && te.owner == AP)
@ -1287,7 +1290,7 @@ void (entity Goal, entity Player) RemoveResults =
puquad = FALSE;
purad = FALSE;
// Make sure we don't remove an effect another Goal is also supplying
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while (te)
{
if ((te.owner == Player) && (te != Goal))
@ -1479,7 +1482,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
if (Goal.if_group_is_active)
{
// Find all goals in the group
te = find (NIL, classname, "info_tfgoal");
te = find (nil, classname, "info_tfgoal");
while (te)
{
if (te.group_no == Goal.if_group_is_active)
@ -1495,7 +1498,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
if (Goal.if_group_is_inactive)
{
// Find all goals in the group
te = find (NIL, classname, "info_tfgoal");
te = find (nil, classname, "info_tfgoal");
while (te)
{
if (te.group_no == Goal.if_group_is_inactive)
@ -1511,7 +1514,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
if (Goal.if_group_is_removed)
{
// Find all goals in the group
te = find (NIL, classname, "info_tfgoal");
te = find (nil, classname, "info_tfgoal");
while (te)
{
if (te.group_no == Goal.if_group_is_removed)
@ -1568,7 +1571,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
if (Goal.has_item_from_group)
{
// Find all goals
te = find (NIL, classname, "item_tfgoal");
te = find (nil, classname, "item_tfgoal");
while (te && !gotone)
{
if (te.group_no == Goal.has_item_from_group && te.owner == AP)
@ -1897,7 +1900,7 @@ void(entity Goal, entity AP) DoGroupWork =
allset = 1;
// Find all goals
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.group_no == Goal.all_active)
@ -1938,7 +1941,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.activate_group_no != 0)
{
// Find all goals
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.group_no == Goal.activate_group_no)
@ -1952,7 +1955,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.inactivate_group_no != 0)
{
// Find all goals
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.group_no == Goal.inactivate_group_no)
@ -1966,7 +1969,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.remove_group_no != 0)
{
// Find all goals
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.group_no == Goal.remove_group_no)
@ -1980,7 +1983,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.restore_group_no != 0)
{
// Find all goals
tg = find (NIL, classname, "info_tfgoal");
tg = find (nil, classname, "info_tfgoal");
while (tg)
{
if (tg.group_no == Goal.restore_group_no)
@ -1994,7 +1997,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.remove_spawngroup != 0)
{
// Find all goals
tg = find (NIL, classname, "info_player_teamspawn");
tg = find (nil, classname, "info_player_teamspawn");
while (tg)
{
if (tg.group_no == Goal.remove_spawngroup)
@ -2010,7 +2013,7 @@ void(entity Goal, entity AP) DoGroupWork =
if (Goal.restore_spawngroup != 0)
{
// Find all goals
tg = find (NIL, classname, "info_player_teamspawn");
tg = find (nil, classname, "info_player_teamspawn");
while (tg)
{
if (tg.group_no == Goal.restore_spawngroup)
@ -2052,7 +2055,7 @@ void(entity Item, entity AP) DoItemGroupWork =
}
// Find all goals
tg = find (NIL, classname, "item_tfgoal");
tg = find (nil, classname, "item_tfgoal");
while (tg)
{
if (tg.group_no == Item.distance)
@ -2084,9 +2087,9 @@ void(entity Item, entity AP) DoItemGroupWork =
RPrint(" has a .speed specified, but no .attack_finished\n");
}
carrier = NIL;
carrier = nil;
// Find all goals
tg = find (NIL, classname, "item_tfgoal");
tg = find (nil, classname, "item_tfgoal");
while (tg)
{
if (tg.group_no == Item.speed)
@ -2129,7 +2132,7 @@ void(entity Goal, entity AP) DoTriggerWork =
// remove targets
if (Goal.killtarget)
{
t = NIL;
t = nil;
do
{
t = find(t, targetname, Goal.killtarget);
@ -2152,7 +2155,7 @@ void(entity Goal, entity AP) DoTriggerWork =
// fire targets
if (Goal.target)
{
t = NIL;
t = nil;
activator = AP;
do
{
@ -2298,7 +2301,7 @@ void(entity Goal, entity AP, float addb) DoResults =
{
if (Goal.goal_no == CTF_FLAG1)
{
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 2)
@ -2336,7 +2339,7 @@ void(entity Goal, entity AP, float addb) DoResults =
}
else if (Goal.goal_no == CTF_FLAG2)
{
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 1)
@ -2373,7 +2376,7 @@ void(entity Goal, entity AP, float addb) DoResults =
}
else if (Goal.goal_no == CTF_DROPOFF1)
{
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 2)
@ -2395,7 +2398,7 @@ void(entity Goal, entity AP, float addb) DoResults =
}
else if (Goal.goal_no == CTF_DROPOFF2)
{
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 1)
@ -2418,7 +2421,7 @@ void(entity Goal, entity AP, float addb) DoResults =
}
// Go through all the players and do any results
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
// Centerprinting
@ -2502,7 +2505,7 @@ void(entity Goal, entity AP, float addb) DoResults =
winners = TeamFortress_TeamGetWinner();
// Stop everyone
te = find (NIL, classname, "player");
te = find (nil, classname, "player");
while (te)
{
te.takedamage = 0;
@ -2526,9 +2529,9 @@ void(entity Goal, entity AP, float addb) DoResults =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
// BecomeExplosion();
}
@ -2659,9 +2662,9 @@ void() tfgoal_timer_tick =
RPrint(" Checking criteria...");
#endif
if (APMeetsCriteria(self, NIL))
if (APMeetsCriteria(self, nil))
{
DoResults(self, NIL, TRUE);
DoResults(self, nil, TRUE);
}
else
{
@ -2679,7 +2682,7 @@ void() tfgoal_timer_tick =
// Touch function for the goalitem entity
void() item_tfgoal_touch =
{
if (infokey(NIL,"ceasefire")=="on") //OfN
if (infokey(nil,"ceasefire")=="on") //OfN
return;
local entity te;
@ -2712,7 +2715,7 @@ void() item_tfgoal_touch =
bprint(PRINT_HIGH, other.netname);
bprint(PRINT_HIGH, " ÒÅÔÕÒÎÅÄ the ÂÌÕÅ flag!\n");
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 1)
@ -2749,7 +2752,7 @@ void() item_tfgoal_touch =
bprint(PRINT_HIGH, other.netname);
bprint(PRINT_HIGH, " ÒÅÔÕÒÎÅÄ the ÒÅÄ flag!\n");
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == 2)
@ -2995,7 +2998,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
// Remove AP Modifications
// Go through all the players and do any results
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (IsAffectedBy(Item, te, AP))
@ -3017,7 +3020,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
if (method == 0) // Dropped by a dying player
{
// Do messages
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (te.team_no == Item.owned_by)
@ -3052,7 +3055,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
DelayReturn.think = ReturnItem;
DelayReturn.nextthink = time + 0.5;
Item.owner = NIL;
Item.owner = nil;
TeamFortress_SetSpeed (AP);
AP.effects |= EF_GlowColor (AP);
/*
@ -3067,14 +3070,14 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
else if (Item.goal_activation & TFGI_DROP)
{
tfgoalitem_drop(Item);
Item.owner = NIL;
Item.owner = nil;
AP.effects |= EF_GlowColor(AP);
Item.owner = AP;
}
else
{
// Remove the Item
Item.owner = NIL;
Item.owner = nil;
dremove(Item);
TeamFortress_SetSpeed(AP);
AP.effects |= EF_GlowColor(AP);
@ -3115,7 +3118,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
tfgoalitem_checkgoalreturn(Item);
*/
Item.owner = NIL;
Item.owner = nil;
TeamFortress_SetSpeed(AP);
AP.effects |= EF_GlowColor(AP);
return;
@ -3123,7 +3126,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
// Don't remove it, since it may be given away again later
Item.solid = SOLID_NOT;
Item.owner = NIL;
Item.owner = nil;
TeamFortress_SetSpeed(AP);
AP.effects |= EF_GlowColor(AP);
return;
@ -3225,9 +3228,9 @@ void(entity Item) tfgoalitem_drop =
Item.origin = Item.owner.origin;
Item.velocity_z = 400;
Item.velocity_x = -50 + (random() * 100);
Item.velocity_y = -50 + (random() * 100);
Item.velocity.z = 400;
Item.velocity.x = -50 + (random() * 100);
Item.velocity.y = -50 + (random() * 100);
Item.movetype = MOVETYPE_TOSS;
//CH set solid state
@ -3268,7 +3271,7 @@ void(entity Item) tfgoalitem_drop =
Item.goal_state = TFGS_INACTIVE;
Item.touch = item_tfgoal_touch;
Item.owner = NIL;
Item.owner = nil;
}
};
@ -3283,7 +3286,7 @@ void() tfgoalitem_settouchandthink =
local entity o = self.owner;
self.owner = NIL;
self.owner = nil;
TeamFortress_SetSpeed (o);
o.effects &= ~EF_ANYGLOW;
@ -3339,7 +3342,7 @@ void() tfgoalitem_remove =
// Do we need to do any CenterPrint2ing?
if (self.noise3 || self.noise4)
{
te = find (NIL, classname, "player");
te = find (nil, classname, "player");
while (te)
{
if (te.team_no == self.owned_by)
@ -3415,7 +3418,7 @@ void(entity Item) tfgoalitem_checkgoalreturn =
{
te = Findgoal(Item.impulse);
if (te)
AttemptToActivate(te, NIL, Item);
AttemptToActivate(te, nil, Item);
}
}
};
@ -3641,7 +3644,7 @@ void() CTF_FlagCheck =
local float flagcount, pos;
flagcount = 0;
te = find(NIL, classname, "item_tfgoal");
te = find(nil, classname, "item_tfgoal");
while (te)
{
if (te.goal_no == CTF_FLAG1)

View file

@ -129,9 +129,9 @@ string(float tno) GetTeamName =
return world.b_b;
}*/
st = infokey(NIL, "team1");
st = infokey(nil, "team1");
if (!st)
st = infokey(NIL, "t1");
st = infokey(nil, "t1");
if (!st || st == "")
return "blue";
@ -143,9 +143,9 @@ string(float tno) GetTeamName =
return world.b_t;
}*/
st = infokey(NIL, "team2");
st = infokey(nil, "team2");
if (!st)
st = infokey(NIL, "t2");
st = infokey(nil, "t2");
if (!st)
return "red";
@ -157,9 +157,9 @@ string(float tno) GetTeamName =
return world.b_n;
}*/
st = infokey(NIL, "team3");
st = infokey(nil, "team3");
if (!st)
st = infokey(NIL, "t3");
st = infokey(nil, "t3");
if (!st)
return "yell";
@ -171,9 +171,9 @@ string(float tno) GetTeamName =
return world.b_o;
}*/
st = infokey(NIL, "team4");
st = infokey(nil, "team4");
if (!st)
st = infokey(NIL, "t4");
st = infokey(nil, "t4");
if (!st)
return "teal";
@ -614,7 +614,7 @@ void(float tno, float scoretoadd) TeamFortress_TeamIncreaseScore =
if (toggleflags & TFLAG_TEAMFRAGS)
{
RPrint ("Teamfrags is on!\n");
e = find(NIL, classname, "player");
e = find(nil, classname, "player");
while (e)
{
if (e.team_no == tno)
@ -664,7 +664,7 @@ float (float tno) TeamFortress_TeamGetNoPlayers =
local entity search;
//local string st;
search = find (NIL, classname, "player");
search = find (nil, classname, "player");
while (search)
{
if (search.team_no == tno)
@ -862,14 +862,14 @@ string(float tno) TeamFortress_TeamGetColorString =
void(entity Player) TeamFortress_TeamShowMemberClasses =
{
/*local string st;
st = infokey(NIL, "no_showmembers"); */
st = infokey(nil, "no_showmembers"); */
local entity e;
local float found;
found = FALSE;
e = find(NIL, classname, "player");
e = find(nil, classname, "player");
while (e)
{
if (((e.team_no == Player.team_no) || (e.team_no == 0)) && (e != Player))
@ -1237,7 +1237,7 @@ void(float tno, entity ignore, string st) teamsprint =
local entity te;
te = find(NIL, classname, "player");
te = find(nil, classname, "player");
while (te)
{
if (Teammate(te.team_no,tno) && te != ignore)

View file

@ -7,7 +7,7 @@ void () BadTinker = {
sprint(self,PRINT_HIGH,"Nothing happened.\n");
}
else if (prob <= 0.8){ // Zowie!
TF_T_Damage(self.building, NIL, NIL, self.building.health+1, 0, 0);
TF_T_Damage(self.building, nil, nil, self.building.health+1, 0, 0);
sprint(self,PRINT_HIGH,"The tesla blew up.\n");
}
else { // ZAP!

View file

@ -64,7 +64,7 @@ void() multi_trigger =
else
{ // we can't just remove (self) here, because this is a touch function
// called while C code is looping through area links...
self.touch = NIL;
self.touch = nil;
self.nextthink = time + 0.1;
self.think = SUB_Remove;
}
@ -357,9 +357,9 @@ void(vector org) spawn_tfog =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_TELEPORT);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PHS);
};
@ -461,7 +461,7 @@ void() teleport_touch =
// put a tfog where the player was
spawn_tfog (other.origin);
t = find (NIL, targetname, self.target);
t = find (nil, targetname, self.target);
if (!t)
objerror ("couldn't find target");
@ -476,7 +476,7 @@ void() teleport_touch =
if (!other.health)
{
other.origin = t.origin;
other.velocity = (v_forward * other.velocity_x) + (v_forward * other.velocity_y);
other.velocity = (v_forward * other.velocity.x) + (v_forward * other.velocity.y);
return;
}
@ -635,7 +635,7 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2;
if (cvar("registered"))
{
local integer rem = self.targetname != self.killtarget;
local int rem = self.targetname != self.killtarget;
self.message = "";
SUB_UseTargets ();
if (rem)
@ -788,15 +788,15 @@ void() trigger_monsterjump_touch =
return;
// set XY even if not on ground, so the jump will clear lips
other.velocity_x = self.movedir_x * self.speed;
other.velocity_y = self.movedir_y * self.speed;
other.velocity.x = self.movedir.x * self.speed;
other.velocity.y = self.movedir.y * self.speed;
if ( !(other.flags & FL_ONGROUND) )
return;
other.flags &= ~FL_ONGROUND;
other.velocity_z = self.height;
other.velocity.z = self.height;
};
/*QUAKED trigger_monsterjump (.5 .5 .5) ?

View file

@ -70,10 +70,10 @@ void() NailGrenadeLaunchNail =
#endif
{
j = (random() + 2) * 5;
current_yaw = anglemod(self.angles_y + j);
self.angles_y = current_yaw;
self.angles_x = 0;
self.angles_z = 0;
current_yaw = anglemod(self.angles.y + j);
self.angles.y = current_yaw;
self.angles.x = 0;
self.angles.z = 0;
makevectors(self.angles);
deathmsg = DMSG_GREN_NAIL;

View file

@ -138,8 +138,8 @@ void(float inp) Menu_Demon_Input =
local string st;
st=GetMonsterName(self.demon_one);
self.demon_one.enemy=NIL;//
self.demon_one.oldenemy=NIL;
self.demon_one.enemy=nil;//
self.demon_one.oldenemy=nil;
self.demon_one.goalentity=self;
self.demon_one.movetarget=self;
self.demon_one.nextthink=time+0.1;
@ -160,8 +160,8 @@ void(float inp) Menu_Demon_Input =
local string st;
st=GetMonsterName(self.demon_one);
self.demon_one.enemy=NIL;
self.demon_one.oldenemy=NIL;////
self.demon_one.enemy=nil;
self.demon_one.oldenemy=nil;////
self.demon_one.goalentity=self.demon_one;
self.demon_one.movetarget=self.demon_one;
self.demon_one.nextthink=time+0.1;
@ -183,10 +183,10 @@ void(float inp) Menu_Demon_Input =
local string st;
st=GetMonsterName(self.demon_one);
self.demon_one.enemy=NIL;//
self.demon_one.oldenemy=NIL;////
self.demon_one.goalentity=NIL;
self.demon_one.movetarget=NIL;
self.demon_one.enemy=nil;//
self.demon_one.oldenemy=nil;////
self.demon_one.goalentity=nil;
self.demon_one.movetarget=nil;
self.demon_one.nextthink=time+0.1;
PutMonsterStand(self.demon_one);
@ -307,7 +307,7 @@ void(float inp) Menu_Demon_Input =
if (self.demon_choice == 5)
{
if (infokey(NIL, "shamking") == "off")
if (infokey(nil, "shamking") == "off")
{
self.impulse = 0;
return;
@ -318,7 +318,7 @@ void(float inp) Menu_Demon_Input =
}
else if (self.demon_choice == 4)
{
if (infokey(NIL, "bsham") == "off")
if (infokey(nil, "bsham") == "off")
{
self.impulse = 0;
return;
@ -508,7 +508,7 @@ void (float points) custom_demon_create =
// sound (self, CHAN_WEAPON, "boss1/out1.wav", 1, ATTN_NORM);
makevectors (self.v_angle);
v_forward_z = 0;
v_forward.z = 0;
v_forward = normalize(v_forward) * 64;
newmis = spawn();
@ -686,7 +686,7 @@ void (float points) custom_demon_create =
newmis.nextthink = time + 1;
//newmis.touch = Demon_JumpTouch;
//newmis.touch = NIL;
//newmis.touch = nil;
sprint(self, PRINT_HIGH, "You summon a hell knight.\n");
}
@ -707,7 +707,7 @@ void (float points) custom_demon_create =
newmis.nextthink = time + 1;
//newmis.touch = Demon_JumpTouch;
//newmis.touch = NIL;
//newmis.touch = nil;
sprint(self, PRINT_HIGH, "You summon a knight.\n");
}*/
@ -730,7 +730,7 @@ void (float points) custom_demon_create =
newmis.nextthink = time + 1;
//newmis.touch = Demon_JumpTouch;
//newmis.touch = NIL;
//newmis.touch = nil;
sprint(self, PRINT_HIGH, "You summon a fiend.\n");
}
@ -754,7 +754,7 @@ void (float points) custom_demon_create =
newmis.think = walkmonster_start;
newmis.nextthink = time + 1;
//newmis.touch = Demon_JumpTouch;
//newmis.touch = NIL;
//newmis.touch = nil;
////newmis.real_owner.demon_blood = 0; marduk bug
if (newmis.has_tesla > 6)
sprint (self, PRINT_HIGH, "You summon a shambler king.\n");
@ -778,7 +778,7 @@ void (float points) custom_demon_create =
newmis.nextthink = time + 0.05;
//newmis.armorclass = 0; //- OfN - none AT_SAVESHOT; // kevlar
newmis.last_saveme_sound = 0; // ? oh that
//newmis.touch = NIL;
//newmis.touch = nil;
sprint(self, PRINT_HIGH, "You summon a scrag.\n");
@ -903,7 +903,7 @@ void () kill_my_demon =
local entity te;
local entity oself;
//WK Clean up demons
te = find(NIL, classname, "monster_demon1");
te = find(nil, classname, "monster_demon1");
while (te)
{
if (te.real_owner == self) {
@ -919,7 +919,7 @@ void () kill_my_demon =
sound (self, CHAN_VOICE, "demon/ddeath.wav", 1, ATTN_NORM);
self = oself;
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
sprint(self, PRINT_HIGH, "Your fiend is dead.\n");
@ -929,7 +929,7 @@ void () kill_my_demon =
te = find(te, classname, "monster_demon1");
}
te = find(NIL, classname, "monster_army");
te = find(nil, classname, "monster_army");
while (te)
{
@ -947,7 +947,7 @@ void () kill_my_demon =
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
// custom_grunt_die;
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
//-----------------------// NOT NEEDED
@ -1002,15 +1002,15 @@ void () kill_my_demon =
sprint (self, PRINT_HIGH, "Your soldier is dead.\n");
self.job &= ~JOB_DEMON_OUT;
self.demon_one = NIL;
self.demon_one = nil;
SetArmyTimer();
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
//TF_T_Damage(te, nil, nil, 4000, 0, 0);
}
te = find(te, classname, "monster_army");
}
/*te = find(NIL, classname, "monster_knight");
/*te = find(nil, classname, "monster_knight");
while (te)
{
@ -1026,18 +1026,18 @@ void () kill_my_demon =
//sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
self = oself;
//self.job &= ~JOB_DEMON_OUT);
sprint (self, PRINT_HIGH, "Your knight is dead.\n");
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
//TF_T_Damage(te, nil, nil, 4000, 0, 0);
}
te = find(te, classname, "monster_knight");
}
te = find(NIL, classname, "monster_hknight");
te = find(nil, classname, "monster_hknight");
while (te)
{
@ -1051,18 +1051,18 @@ void () kill_my_demon =
ThrowGib ("progs/gib3.mdl", -70);
sound (self, CHAN_VOICE, "hknight/death1.wav", 1, ATTN_NORM);
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
self = oself;
//self.job &= ~JOB_DEMON_OUT);
sprint (self, PRINT_HIGH, "Your hell knight is dead.\n");
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
//TF_T_Damage(te, nil, nil, 4000, 0, 0);
}
te = find(te, classname, "monster_hknight");
}*/
te = find(NIL, classname, "monster_shambler");
te = find(nil, classname, "monster_shambler");
while (te)
{
@ -1076,19 +1076,19 @@ void () kill_my_demon =
ThrowGib ("progs/gib3.mdl", -70);
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
self = oself;
//self.job &= ~JOB_DEMON_OUT);
sprint (self, PRINT_HIGH, "Your shambler is dead.\n");
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
//TF_T_Damage(te, nil, nil, 4000, 0, 0);
}
te = find(te, classname, "monster_shambler");
}
te = find(NIL, classname, "monster_wizard");
te = find(nil, classname, "monster_wizard");
while (te)
{
@ -1102,23 +1102,23 @@ void () kill_my_demon =
ThrowGib ("progs/gib3.mdl", -70);
sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);
te.think = SUB_Remove;
te.touch = NIL;
te.touch = nil;
te.nextthink = time + 0.1;
self = oself;
sprint (self, PRINT_HIGH, "Your scrag is dead.\n");
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
//TF_T_Damage(te, nil, nil, 4000, 0, 0);
}
te = find(te, classname, "monster_wizard");
}
self.job &= ~JOB_DEMON_OUT;
self.demon_one = NIL;
self.demon_one = nil;
self.summon_one = NIL;
self.summon_two = NIL;
self.summon_one = nil;
self.summon_two = nil;
};
void() MonsterTouch =
@ -1193,7 +1193,7 @@ void (entity player) UpdateSummons =
}
if (player.summon_one.has_holo == 0) // set to 0 on die thinks
player.summon_one = NIL;
player.summon_one = nil;
}
// Update our second summon
@ -1206,7 +1206,7 @@ void (entity player) UpdateSummons =
}
if (player.summon_two.has_holo == 0) // set to 0 on die thinks
player.summon_two = NIL;
player.summon_two = nil;
}
};

View file

@ -14,34 +14,34 @@
.vector waypoint1;
.vector waypoint2;
.vector waypoint3;
.integer waypoint_count;
.int waypoint_count;
#define MAX_WAYPOINTS 4
#define WAYPOINT_TOUCHDIST 50
/* private functions */
vector (entity ent, integer index) _Waypoint_Get;
void (entity ent, integer index, vector loc) _Waypoint_Set;
vector (entity ent, int index) _Waypoint_Get;
void (entity ent, int index, vector loc) _Waypoint_Set;
/* end private functions */
boolean (entity ent, integer index) Waypoint_IsValid =
boolean (entity ent, int index) Waypoint_IsValid =
{
return index > 0 && index < ent.waypoint_count;
};
integer (entity ent) Waypoint_Count =
int (entity ent) Waypoint_Count =
{
return ent.waypoint_count;
};
vector (entity ent, integer index) Waypoint_Get =
vector (entity ent, int index) Waypoint_Get =
{
if (!Waypoint_IsValid (ent, index))
error ("Waypoint_Get: invalid waypoint.\n");
return _Waypoint_Get (ent, index);
};
void (entity ent, integer index, vector loc) Waypoint_Set =
void (entity ent, int index, vector loc) Waypoint_Set =
{
if (!Waypoint_IsValid (ent, index))
error ("Waypoint_Set: invalid waypoint.\n");
@ -53,14 +53,14 @@ void (entity ent, vector loc) Waypoint_Append =
Waypoint_Add (ent, ent.waypoint_count, loc);
};
boolean (entity ent, integer index) Waypoint_IsTouching =
boolean (entity ent, int index) Waypoint_IsTouching =
{
return vlen(Waypoint_Get (ent, index) - ent.origin) < WAYPOINT_TOUCHDIST;
};
void (entity ent, integer index, vector loc) Waypoint_Add =
void (entity ent, int index, vector loc) Waypoint_Add =
{
local integer i;
local int i;
if (ent.waypoint_count >= MAX_WAYPOINTS)
error ("Waypoint_Add: maximum waypoints hit!\n");
@ -78,9 +78,9 @@ void (entity ent, integer index, vector loc) Waypoint_Add =
ent.waypoint_count += 1;
};
void (entity ent, integer index) Waypoint_Remove =
void (entity ent, int index) Waypoint_Remove =
{
local integer i;
local int i;
if (!Waypoint_IsValid (ent, index))
error ("Waypoint_Remove: bad index number.\n");
@ -95,7 +95,7 @@ void (entity ent, integer index) Waypoint_Remove =
/* Internally used functions. Don't call them from outside this file. */
vector (entity ent, integer index) _Waypoint_Get =
vector (entity ent, int index) _Waypoint_Get =
{
if (index == 0)
return ent.waypoint0;
@ -107,9 +107,10 @@ vector (entity ent, integer index) _Waypoint_Get =
return ent.waypoint3;
else
error ("_Waypoint_Get: bad waypoint index!\n");
return nil; //FIXME no-return functions
};
void (entity ent, integer index, vector loc) _Waypoint_Set =
void (entity ent, int index, vector loc) _Waypoint_Set =
{
if (index == 0)
ent.waypoint0 = loc;

View file

@ -1,8 +1,8 @@
boolean (entity ent, integer index) Waypoint_IsValid;
integer (entity ent) Waypoint_Count;
vector (entity ent, integer index) Waypoint_Get;
void (entity ent, integer index, vector loc) Waypoint_Set;
boolean (entity ent, int index) Waypoint_IsValid;
int (entity ent) Waypoint_Count;
vector (entity ent, int index) Waypoint_Get;
void (entity ent, int index, vector loc) Waypoint_Set;
void (entity ent, vector loc) Waypoint_Append;
boolean (entity ent, integer index) Waypoint_IsTouching;
void (entity ent, integer index, vector loc) Waypoint_Add;
void (entity ent, integer index) Waypoint_Remove;
boolean (entity ent, int index) Waypoint_IsTouching;
void (entity ent, int index, vector loc) Waypoint_Add;
void (entity ent, int index) Waypoint_Remove;

View file

@ -268,7 +268,7 @@ void (entity atk, boolean do_cc, float dist) find_melee =
do {
local vector diff = source - (te.origin + '0 0 16');
diff_z *= 0.75; //hack
diff.z *= 0.75; //hack
local float l;
@ -332,9 +332,9 @@ void() W_FireAxe =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
};
@ -348,7 +348,7 @@ boolean (boolean strict) is_backstab =
dir = trace_ent.origin - self.origin;
dir_z *= 0.75; // hack
dir.z *= 0.75; // hack
d = normalize (dir) * v_forward;
@ -457,9 +457,9 @@ void() W_FireBackstab =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
}
@ -517,9 +517,9 @@ void() W_FireSpanner =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
}
@ -589,9 +589,9 @@ void() W_FireSpanner =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
W_SetCurrentAmmo ();
@ -612,9 +612,9 @@ void() W_FireSpanner =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
};
@ -648,7 +648,7 @@ void(float inAuto) W_FireMedikit =
// remove concussion from player
// Try to find a concusstimer entity for this player
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != trace_ent) || (te.think != ConcussionGrenadeTimer)) && (te)) {
te = find(te, classname, "timer");
}
@ -673,7 +673,7 @@ void(float inAuto) W_FireMedikit =
// remove hallucination from player
// Try to find a hallucination timer entity for this player
if (trace_ent.tfstate & TFSTATE_HALLUCINATING) {
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != trace_ent)
|| (te.think != HallucinationTimer)) && (te)) {
te = find(te, classname, "timer");
@ -701,7 +701,7 @@ void(float inAuto) W_FireMedikit =
// remove tranquilisation from player
// Try to find a tranquilisation timer entity for this player
if (trace_ent.tfstate & TFSTATE_TRANQUILISED) {
te = find(NIL, classname, "timer");
te = find(nil, classname, "timer");
while (((te.owner != trace_ent) || (te.think != TranquiliserTimer)) && (te)) {
te = find(te, classname, "timer");
}
@ -728,7 +728,7 @@ void(float inAuto) W_FireMedikit =
// check if the healed player is blinded
if (trace_ent.FlashTime > 0) {
te = find(NIL, netname, "flashtimer");
te = find(nil, netname, "flashtimer");
while ((te.owner != trace_ent || te.classname != "timer") && (te))
te = find(te, netname, "flashtimer");
@ -901,9 +901,9 @@ void(float inAuto) W_FireMedikit =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
};
@ -985,9 +985,9 @@ void() W_FireBioweapon =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
}
};
@ -1023,7 +1023,7 @@ void(vector org, vector vel) SpawnMeatSpray =
makevectors (self.angles);
missile.velocity = vel;
missile.velocity_z = missile.velocity_z + 250 + 50*random();
missile.velocity.z = missile.velocity.z + 250 + 50*random();
missile.avelocity = '3000 1000 2000';
@ -1046,9 +1046,9 @@ void(vector org, float damage) SpawnBlood =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_BLOOD);
WriteByte (MSG_MULTICAST, 1);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PVS);
};
@ -1096,7 +1096,7 @@ float puff_count;
void() ClearMultiDamage =
{
multi_ent = NIL;
multi_ent = nil;
multi_damage = 0;
blood_count = 0;
puff_count = 0;
@ -1126,15 +1126,15 @@ void(entity hit, float damage) AddMultiDamage =
multi_damage = multi_damage + damage;
};
void (integer big) Multi_Finish =
void (int big) Multi_Finish =
{
if (puff_count) {
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, big ? puff_count * 2 : puff_count);
WriteCoord (MSG_MULTICAST, puff_org_x);
WriteCoord (MSG_MULTICAST, puff_org_y);
WriteCoord (MSG_MULTICAST, puff_org_z);
WriteCoord (MSG_MULTICAST, puff_org.x);
WriteCoord (MSG_MULTICAST, puff_org.y);
WriteCoord (MSG_MULTICAST, puff_org.z);
multicast (puff_org, MULTICAST_PVS);
}
@ -1142,9 +1142,9 @@ void (integer big) Multi_Finish =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_BLOOD);
WriteByte (MSG_MULTICAST, big ? blood_count * 2 : puff_count);
WriteCoord (MSG_MULTICAST, blood_org_x);
WriteCoord (MSG_MULTICAST, blood_org_y);
WriteCoord (MSG_MULTICAST, blood_org_z);
WriteCoord (MSG_MULTICAST, blood_org.x);
WriteCoord (MSG_MULTICAST, blood_org.y);
WriteCoord (MSG_MULTICAST, blood_org.z);
multicast (puff_org, MULTICAST_PVS);
}
};
@ -1202,9 +1202,9 @@ void(float shotcount, vector dir, vector spread) FireBullets =
{
local vector direction;
local vector src;
local string st = infokey (NIL, "numpuffs");
local string st = infokey (nil, "numpuffs");
local float numpuffs = 0;
local integer puffdiv;
local int puffdiv;
if (st)
numpuffs = stof (st) - 1;
@ -1217,12 +1217,12 @@ void(float shotcount, vector dir, vector spread) FireBullets =
makevectors (self.v_angle);
src = self.origin + v_forward * 10;
src_z = self.absmin_z + self.size_z * 0.7;
src.z = self.absmin.z + self.size.z * 0.7;
ClearMultiDamage ();
while (shotcount > 0) {
direction = dir + crandom() * spread_x * v_right + crandom() * spread_y * v_up;
direction = dir + crandom() * spread.x * v_right + crandom() * spread.y * v_up;
traceline (src, src + direction * 4096, FALSE, self);
@ -1313,7 +1313,7 @@ void(vector direction, float damage) FireSniperBullet =
makevectors (self.v_angle);
src = self.origin + v_forward * 10;
src_z = self.absmin_z + self.size_z * 0.7;
src.z = self.absmin.z + self.size.z * 0.7;
ClearMultiDamage ();
@ -1351,13 +1351,13 @@ void() W_FireSniperRifle =
self.heat = 100;
if (self.heat > 0) {
angle_x += (random() * 0.08 * self.heat) - (0.04 * self.heat);
angle_y += (random() * 0.08 * self.heat) - (0.04 * self.heat);
angle.x += (random() * 0.08 * self.heat) - (0.04 * self.heat);
angle.y += (random() * 0.08 * self.heat) - (0.04 * self.heat);
}
makevectors(angle);
src = self.origin + v_forward * 10;
src_z = self.absmin_z + self.size_z * 0.7;
src.z = self.absmin.z + self.size.z * 0.7;
dir = v_forward; //XXX is this correct?
@ -1383,7 +1383,7 @@ void() W_FireSniperRifle =
dam_mult = 0;
local string st = infokey (NIL, "sniper_dmg");
local string st = infokey (nil, "sniper_dmg");
if (st)
dam_mult = stof (st);
if (!dam_mult)
@ -1408,19 +1408,19 @@ void() W_FireSniperRifle =
f = trace_endpos - src;
g_x = trace_endpos_x;
g_y = trace_endpos_y;
g_z = 0;
g.x = trace_endpos.x;
g.y = trace_endpos.y;
g.z = 0;
h_x = trace_ent.origin_x;
h_y = trace_ent.origin_y;
h_z = 0;
h.x = trace_ent.origin.x;
h.y = trace_ent.origin.y;
h.z = 0;
x = vlen(g - h);
f = (normalize(f) * x) + trace_endpos;
zdif = f_z - trace_ent.origin_z;
zdif = f.z - trace_ent.origin.z;
deathmsg = DMSG_SNIPERRIFLE;
trace_ent.head_shot_vector = '0 0 0';
@ -1663,9 +1663,9 @@ void() T_MissileTouch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
if (other.classname == "force_field") //- OfN - Makes field explosion b4 removing it
@ -1683,8 +1683,8 @@ void() Rocket_Track_Dot =
local vector dir, vtemp;
local entity tg, sight;
sight = NIL;
tg = find (NIL, classname, "timer");
sight = nil;
tg = find (nil, classname, "timer");
while (tg) {
if (tg.owner == self.owner && tg.think == SniperSight_Update2)
sight = tg;
@ -1737,7 +1737,7 @@ W_FireRocket
void() W_FireRocket =
{
local float loops;
local vector olorigin, dir = NIL; //XXX false +ve for dir
local vector olorigin, dir = nil; //XXX false +ve for dir
loops = 0;
if (self.tf_items & NIT_CLUSTER_ROCKETS && self.cluster_mode == TRUE)
loops = 5;
@ -1838,9 +1838,9 @@ void(entity from, float damage) LightningHit =
{
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNINGBLOOD);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
multicast (trace_endpos, MULTICAST_PVS);
TF_T_Damage (trace_ent, from, from, damage, TF_TD_NOTTEAM, TF_TD_ELECTRICITY);
@ -1858,12 +1858,12 @@ void(vector p1, vector p2, entity from, float damage) LightningDamage =
f = p2 - p1;
normalize (f);
f_x = 0 - f_y;
f_y = f_x;
f_z = 0;
f.x = 0 - f.y;
f.y = f.x;
f.z = 0;
f = f*16;
e1 = e2 = NIL;
e1 = e2 = nil;
traceline (p1, p2, FALSE, self);
@ -1908,8 +1908,8 @@ void() W_FireLightning =
self.ammo_cells = self.ammo_cells - cells;
W_SetCurrentAmmo ();
deathmsg = DMSG_LIGHTNING;
//WK T_RadiusDamage (self, self, 35*cells, NIL);
T_RadiusDamage (self, self, 20*cells, NIL);
//WK T_RadiusDamage (self, self, 35*cells, nil);
T_RadiusDamage (self, self, 20*cells, nil);
Attack_Finished(5);
return;
}
@ -1949,12 +1949,12 @@ void() W_FireLightning =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNING2);
WriteEntity (MSG_MULTICAST, self);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
multicast (org, MULTICAST_PHS);
return;
@ -1966,12 +1966,12 @@ void() W_FireLightning =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_LIGHTNING2);
WriteEntity (MSG_MULTICAST, self);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, trace_endpos_x);
WriteCoord (MSG_MULTICAST, trace_endpos_y);
WriteCoord (MSG_MULTICAST, trace_endpos_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
WriteCoord (MSG_MULTICAST, trace_endpos.x);
WriteCoord (MSG_MULTICAST, trace_endpos.y);
WriteCoord (MSG_MULTICAST, trace_endpos.z);
multicast (org, MULTICAST_PHS);
LightningDamage (self.origin, trace_endpos + v_forward*4, self, damage);
@ -2005,7 +2005,7 @@ void(float tno) ExplodeOldPipebomb =
index = num_world_pipebombs - MAX_WORLD_PIPEBOMBS;
}
old = find(NIL, classname, "pipebomb");
old = find(nil, classname, "pipebomb");
while (index > 0) {
if (!old) {
RPrint("*** ERROR: ExplodeOldPipebomb. ***\n");
@ -2062,7 +2062,7 @@ void() GrenadeExplode =
}
deathmsg = self.weapon;
T_RadiusDamage (self, self.owner, 120, NIL);
T_RadiusDamage (self, self.owner, 120, nil);
#ifdef DEMO_STUFF
// Remove any camera's locks on this missile
@ -2072,9 +2072,9 @@ void() GrenadeExplode =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
dremove(self);
};
@ -2134,12 +2134,12 @@ void() W_FireGrenade =
// set newmis speed
makevectors (self.v_angle);
if (self.v_angle_x)
if (self.v_angle.x)
newmis.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
else {
newmis.velocity = aim(self, 10000);
newmis.velocity = newmis.velocity * 600;
newmis.velocity_z = 200;
newmis.velocity.z = 200;
}
newmis.avelocity = '300 300 300';
newmis.angles = vectoangles(newmis.velocity);
@ -2235,9 +2235,9 @@ void() superspike_touch =
else {
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_SUPERSPIKE);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
}
}
@ -2299,7 +2299,7 @@ void(float ox) W_FireSpikes =
}
};
//.float hit_z;
//.float hit.z;
void() spike_touch =
{
if (other.solid == SOLID_TRIGGER)
@ -2345,9 +2345,9 @@ void() spike_touch =
WriteByte (MSG_MULTICAST, TE_KNIGHTSPIKE);
else
WriteByte (MSG_MULTICAST, TE_SPIKE);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
}
}
@ -4091,7 +4091,7 @@ void() DeadImpulses =
return;
}
#ifdef DEBUG
if (self.impulse == 69 && infokey(NIL, "allow_debug") == "yes")
if (self.impulse == 69 && infokey(nil, "allow_debug") == "yes")
{
self.demon_blood = MAX_KNIFE_BLOOD;
self.job |= JOB_BLOODY_KNIFE;
@ -4099,15 +4099,15 @@ void() DeadImpulses =
return;
}
if (self.impulse == 18 && infokey(NIL, "allow_debug") == "yes")
if (self.impulse == 18 && infokey(nil, "allow_debug") == "yes")
{
sprint(self, PRINT_HIGH, "Your origin is: '", ftos(self.origin_x), " ", ftos(self.origin_y));
sprint(self, PRINT_HIGH, " ", ftos(self.origin_z), "'\n");
sprint(self, PRINT_HIGH, "Your origin is: '", ftos(self.origin.x), " ", ftos(self.origin.y));
sprint(self, PRINT_HIGH, " ", ftos(self.origin.z), "'\n");
self.impulse=0;
return;
}
if (self.impulse == 195 && !debug_target && infokey(NIL, "allow_debug") == "yes")
if (self.impulse == 195 && !debug_target && infokey(nil, "allow_debug") == "yes")
debug_target = self;
#endif
@ -4292,7 +4292,7 @@ void() W_WeaponFrame =
}
} else {
tv = self.velocity;
tv_z = 0;
tv.z = 0;
if (vlen(tv) <= WEAP_SNIPER_RIFLE_MAX_MOVE && W_CheckNoAmmo()) {
// create the laser sight
@ -4388,9 +4388,9 @@ void() T_DaedalusTouch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
WriteCoord (MSG_MULTICAST, self.origin_x);
WriteCoord (MSG_MULTICAST, self.origin_y);
WriteCoord (MSG_MULTICAST, self.origin_z);
WriteCoord (MSG_MULTICAST, self.origin.x);
WriteCoord (MSG_MULTICAST, self.origin.y);
WriteCoord (MSG_MULTICAST, self.origin.z);
multicast (self.origin, MULTICAST_PHS);
if (other.classname == "force_field") //- OfN - Makes field explosion b4 removing it
@ -4551,7 +4551,7 @@ void() HIP_LaserTouch =
local vector oldvel;
// local float r;
self.owner = NIL;
self.owner = nil;
self.cnt = self.cnt + 1;
if (pointcontents(self.origin) == CONTENTS_SKY) {
remove(self);
@ -4586,9 +4586,9 @@ void() HIP_LaserTouch =
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
WriteByte (MSG_MULTICAST, TE_GUNSHOT);
WriteByte (MSG_MULTICAST, 3);
WriteCoord (MSG_MULTICAST, org_x);
WriteCoord (MSG_MULTICAST, org_y);
WriteCoord (MSG_MULTICAST, org_z);
WriteCoord (MSG_MULTICAST, org.x);
WriteCoord (MSG_MULTICAST, org.y);
WriteCoord (MSG_MULTICAST, org.z);
multicast (org, MULTICAST_PHS);
} else {
// self.dmg = 0.66 * self.dmg;
@ -4693,7 +4693,7 @@ void(float stat) HIP_FireLaser =
ofs = 6;
out = v_forward;
out_z = 0;
out.z = 0;
out = normalize(out);
org = self.origin + ((12-ofs) * v_up) + (12*out);
// org = self.origin + (1*v_forward);

View file

@ -60,7 +60,7 @@ void(entity missile, float mspeed, float accuracy) LaunchMissile =
// get the entities xy velocity
move = self.enemy.velocity;
move_z = 0;
move.z = 0;
// project the target forward in time
vec = vec + move * fly;
@ -71,7 +71,7 @@ void(entity missile, float mspeed, float accuracy) LaunchMissile =
missile.velocity = vec * mspeed;
missile.angles = '0 0 0';
missile.angles_y = vectoyaw(missile.velocity);
missile.angles.y = vectoyaw(missile.velocity);
// set missile duration
missile.nextthink = time + 10; //- OfN - was 5
@ -166,7 +166,7 @@ float() WizardCheckAttack =
WizardAttackFinished
=================
*/
float() WizardAttackFinished =
void() WizardAttackFinished =
{
if (enemy_range >= RANGE_MID || !enemy_vis)
{
@ -336,9 +336,9 @@ void() wiz_pain4 =[ $pain4, wiz_run1 ] {};
void() wiz_death1 =[ $death1, wiz_death2 ] {
self.velocity_x = -200 + 400*random();
self.velocity_y = -200 + 400*random();
self.velocity_z = 100 + 100*random();
self.velocity.x = -200 + 400*random();
self.velocity.y = -200 + 400*random();
self.velocity.z = 100 + 100*random();
self.flags &= ~FL_ONGROUND;
sound (self, CHAN_VOICE, "wizard/wdeath.wav", 1, ATTN_MONSTERDIE);
};
@ -361,7 +361,7 @@ void() wiz_die =
sprint(self.real_owner,PRINT_HIGH,"Your scrag is dead.\n");
self.real_owner.job &= ~JOB_DEMON_OUT;
self.real_owner.job_finished = time + 5; //Can't summon streams of demons SB can so
self.real_owner.demon_one = NIL;
self.real_owner.demon_one = nil;
}
// check for gib
@ -378,7 +378,7 @@ void() wiz_die =
}
self.classname = "monster_corpse";
self.think=NIL;
self.think=nil;
wiz_death1();
};

View file

@ -196,7 +196,7 @@ void() worldspawn =
last_team_no = 5;
st = infokey(NIL, "mapcfg");
st = infokey(nil, "mapcfg");
if (!(st == "0" || st == "off" || st == ""))
{
if (st == "1" || st == "on")
@ -207,12 +207,12 @@ void() worldspawn =
localcmd("exec \"");
localcmd(st);
localcmd("/");
localcmd(infokey(NIL, "map"));
localcmd(infokey(nil, "map"));
localcmd(".cfg\"\n");
}
// custom map attributes
st = infokey(NIL, "*gamedir");
st = infokey(nil, "*gamedir");
if (st != "fortress")
{
if (st == "")
@ -224,28 +224,28 @@ void() worldspawn =
//- OfteN globals -//
UpdateInfos();
debug_target=NIL;
debug_target=nil;
already_chosen_map = FALSE;
triggered_cycle = FALSE;
////////////////////
if (stof(infokey (NIL, "edictticker")))
if (stof(infokey (nil, "edictticker")))
{
ticker = spawn();
ticker.classname = "edictcount";
ticker.nextthink = time + 5;
ticker.think = edictticker_think;
ticker.num_mines = stof(infokey (NIL, "edictticker")); // I hate overloading, but I don't want to use a full thing just for this one stupid little hack.
ticker.num_mines = stof(infokey (nil, "edictticker")); // I hate overloading, but I don't want to use a full thing just for this one stupid little hack.
}
// We set up Chris' Teamplay Plus Mode here cos that's fun
/*st = infokey(NIL, "chris");
/*st = infokey(nil, "chris");
if (st == "on")
chris = TRUE;
else
chris = stof(st);
st = infokey(NIL, "roundtime");
st = infokey(nil, "roundtime");
roundtime = stof(st);
if (!roundtime)
roundtime = 300;
@ -258,13 +258,13 @@ void() worldspawn =
// We load the masks from the map, overriding it with infokeys if
// they exist
st = infokey (NIL, "friends1_mask");
st = infokey (nil, "friends1_mask");
friends1_mask = stof (st ? st : self.noise1);
st = infokey (NIL, "friends2_mask");
st = infokey (nil, "friends2_mask");
friends2_mask = stof (st ? st : self.noise2);
st = infokey (NIL, "friends3_mask");
st = infokey (nil, "friends3_mask");
friends3_mask = stof (st ? st : self.noise3);
st = infokey (NIL, "friends4_mask");
st = infokey (nil, "friends4_mask");
friends4_mask = stof (st ? st : self.noise4);
@ -576,7 +576,7 @@ void() StartFrame =
local string timeleft;
timeleft = timelimit ? sprintf ("%.0f", (timelimit - time) / 60) : "";
if (timeleft != infokey (NIL, "timeleft"))
if (timeleft != infokey (nil, "timeleft"))
localcmd ("serverinfo timeleft " + timeleft + "\n");
};
@ -628,7 +628,7 @@ void(entity ent) CopyToBodyQue =
};
integer(entity e) entpointcontents = {
int(entity e) entpointcontents = {
return hullpointcontents(world, e.mins, e.maxs, e.origin);
};