mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2025-01-18 23:51:53 +00:00
world -> NIL for null entities. Seems to work (only issue would be borked
tests for foo == world -> !foo and for != world -> foo).
This commit is contained in:
parent
eb054058cd
commit
99190cb79a
56 changed files with 824 additions and 824 deletions
|
@ -119,7 +119,7 @@ void() TeamFortress_SaveMe =
|
|||
self.last_saveme_sound = time + 4;
|
||||
}
|
||||
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (self.weapons_carried & WEAP_MEDIKIT)
|
||||
|
@ -189,7 +189,7 @@ void(float inAuto) TeamFortress_ID =
|
|||
//else
|
||||
// spacer = "\n\n\n\n\n\n\n";
|
||||
|
||||
if (trace_ent != world && trace_ent.origin != world.origin )
|
||||
if (trace_ent && trace_ent.origin != world.origin )
|
||||
{
|
||||
if (trace_ent.classname == "player" && trace_ent.health > 0)
|
||||
{
|
||||
|
@ -705,10 +705,10 @@ void() TeamFortress_DropItems =
|
|||
{
|
||||
local entity tg;
|
||||
|
||||
tg = find (world, classname, "item_tfgoal");
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.owner == self && tg != world && tg.classname == "item_tfgoal")
|
||||
if (tg.owner == self && tg && tg.classname == "item_tfgoal")
|
||||
{
|
||||
if (tg.goal_result & TFGR_DROPITEMS)
|
||||
{
|
||||
|
|
46
admin.qc
46
admin.qc
|
@ -10,7 +10,7 @@
|
|||
float() Admin_is_Disabled =
|
||||
{
|
||||
local string st;
|
||||
st = infokey(world, "no_admin");
|
||||
st = infokey(NIL, "no_admin");
|
||||
if (st == "1" || st == "on")
|
||||
{
|
||||
sprint(self, PRINT_HIGH, "All admin actions are disabled.\n");
|
||||
|
@ -24,12 +24,12 @@ float(entity theAdmin) HasValidAdminTarget =
|
|||
{
|
||||
if (theAdmin.admin_kick.classname != "player") {
|
||||
sprint(theAdmin, PRINT_HIGH, "No user selected!\n");
|
||||
theAdmin.admin_kick = world;
|
||||
theAdmin.admin_kick = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
if (theAdmin.admin_kick.has_disconnected) {
|
||||
sprint(theAdmin, PRINT_HIGH, "User has disconnected!\n");
|
||||
theAdmin.admin_kick = world;
|
||||
theAdmin.admin_kick = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ float(entity person) Is_Admin =
|
|||
return TRUE;
|
||||
else
|
||||
{
|
||||
pass = infokey(world, "adminpwd");
|
||||
pass = infokey(NIL, "adminpwd");
|
||||
if (pass)
|
||||
{
|
||||
if (infokey(person, "adminpwd") == pass)
|
||||
|
@ -68,7 +68,7 @@ void(entity person) Check_Admin_Password =
|
|||
}
|
||||
|
||||
local string pass;
|
||||
pass = infokey(world, "adminpwd");
|
||||
pass = infokey(NIL, "adminpwd");
|
||||
if (pass)
|
||||
{
|
||||
if (infokey(person, "adminpwd") == pass)
|
||||
|
@ -100,10 +100,10 @@ void() Admin_Kick_Cycle =
|
|||
loopc = 0;
|
||||
num = FALSE;
|
||||
|
||||
te = world;
|
||||
te = NIL;
|
||||
|
||||
te = find(self.admin_kick, classname, "player");
|
||||
while (te != world && num == FALSE)
|
||||
while (te && num == FALSE)
|
||||
{
|
||||
num = TRUE;
|
||||
|
||||
|
@ -117,7 +117,7 @@ void() Admin_Kick_Cycle =
|
|||
}
|
||||
|
||||
|
||||
//te = world;
|
||||
//te = NIL;
|
||||
|
||||
/*while (num == FALSE && loopc < 32)
|
||||
{
|
||||
|
@ -138,9 +138,9 @@ void() Admin_Kick_Cycle =
|
|||
loopc = loopc + 1;
|
||||
}*/
|
||||
//if (loopc >= 32) {
|
||||
if (te == world) {
|
||||
if (!te) {
|
||||
sprint(self, PRINT_HIGH, "No Clients Found!\n");
|
||||
self.admin_kick=world;
|
||||
self.admin_kick=NIL;
|
||||
} else {
|
||||
self.admin_kick = te; //Set current selected person
|
||||
//sprint(self, PRINT_HIGH, "You can type ëéãë or âáî to throw them out. Type çåô again to select someone else.");
|
||||
|
@ -161,15 +161,15 @@ void() Admin_Kick_Person =
|
|||
if (Admin_is_Disabled())
|
||||
return;
|
||||
|
||||
if (self.admin_kick != world) //Bad
|
||||
if (self.admin_kick) //Bad
|
||||
{
|
||||
//WK Add checks so that it doesn't crash the server!
|
||||
/*if (self.admin_kick.classname != "player") {
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}
|
||||
if (self.admin_kick.has_disconnected) {
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}*/
|
||||
|
||||
|
@ -183,7 +183,7 @@ void() Admin_Kick_Person =
|
|||
|
||||
stuffcmd(self.admin_kick, "disconnect\n"); //Kick them!
|
||||
|
||||
self.admin_kick = world; //Clear it //WK BUG! Used to be ==
|
||||
self.admin_kick = NIL; //Clear it //WK BUG! Used to be ==
|
||||
}
|
||||
else
|
||||
sprint(self, PRINT_HIGH, "No target client selected!\n");
|
||||
|
@ -201,15 +201,15 @@ void() Admin_Ban_Person =
|
|||
if (Admin_is_Disabled())
|
||||
return;
|
||||
|
||||
if (self.admin_kick != world) //Bad
|
||||
if (self.admin_kick) //Bad
|
||||
{
|
||||
//WK Add checks so that it doesn't crash the server!
|
||||
/*if (self.admin_kick.classname != "player") {
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}
|
||||
if (self.admin_kick.has_disconnected) {
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}*/
|
||||
|
||||
|
@ -228,7 +228,7 @@ void() Admin_Ban_Person =
|
|||
|
||||
stuffcmd(self.admin_kick, "disconnect\n"); //Kick them!
|
||||
|
||||
self.admin_kick = world; //Clear it //WK BUG! Used to be ==
|
||||
self.admin_kick = NIL; //Clear it //WK BUG! Used to be ==
|
||||
}
|
||||
else
|
||||
sprint(self, PRINT_HIGH, "No target client selected!\n");
|
||||
|
@ -252,17 +252,17 @@ void() Admin_Cmd =
|
|||
if (Admin_is_Disabled())
|
||||
return;
|
||||
|
||||
if (self.admin_kick != world) //Bad
|
||||
if (self.admin_kick) //Bad
|
||||
{
|
||||
//WK Add checks so that it doesn't crash the server!
|
||||
/*if (self.admin_kick.classname != "player") {
|
||||
sprint(self, PRINT_HIGH, "No user selected!\n");
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}
|
||||
if (self.admin_kick.has_disconnected) {
|
||||
sprint(self, PRINT_HIGH, "User has disconnected!\n");
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
return;
|
||||
}*/
|
||||
|
||||
|
@ -280,7 +280,7 @@ void() Admin_Cmd =
|
|||
local string st2;
|
||||
|
||||
tf = 0;
|
||||
st2 = infokey(world, "curse");
|
||||
st2 = infokey(NIL, "curse");
|
||||
|
||||
if (!st2)
|
||||
tf = stof(st2);
|
||||
|
@ -435,7 +435,7 @@ void() Admin_Call_Ceasefire =
|
|||
if (Admin_is_Disabled())
|
||||
return;
|
||||
|
||||
st = infokey(world, "ceasefire");
|
||||
st = infokey(NIL, "ceasefire");
|
||||
if (st == "on")
|
||||
{
|
||||
localcmd("localinfo ceasefire \"off\"\n"); //Turn it off
|
||||
|
|
46
ai.qc
46
ai.qc
|
@ -30,7 +30,7 @@ void() wiz_die;
|
|||
/*
|
||||
|
||||
.enemy
|
||||
Will be world 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.
|
||||
|
@ -110,8 +110,8 @@ void(entity test) AI_Check_Contents =
|
|||
|
||||
if (self.health > self.max_health)
|
||||
self.health = self.max_health;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, 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 (pointcontents(test.origin) == CONTENTS_LAVA)
|
||||
|
@ -121,7 +121,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, world, world, 25, 0, TF_TD_FIRE);
|
||||
//TF_T_Damage (self, NIL, NIL, 25, 0, TF_TD_FIRE);
|
||||
if (IsMonster(self))
|
||||
{
|
||||
local string MName;
|
||||
|
@ -163,8 +163,8 @@ void(entity test) AI_Check_Contents =
|
|||
if (self.dmgtime < time)
|
||||
{
|
||||
self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, 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))
|
||||
{
|
||||
|
@ -200,8 +200,8 @@ void(entity test) AI_Check_Contents =
|
|||
if (self.dmgtime < time)
|
||||
{
|
||||
// self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, (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;
|
||||
|
@ -227,8 +227,8 @@ void(entity test) AI_Check_Contents =
|
|||
if (self.dmgtime < time)
|
||||
{
|
||||
// self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, (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
|
||||
|
@ -255,8 +255,8 @@ void(entity test) AI_Check_Contents =
|
|||
if (self.dmgtime < time)
|
||||
{
|
||||
// self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, (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;
|
||||
|
@ -273,8 +273,8 @@ void(entity test) AI_Check_Contents =
|
|||
if (self.dmgtime < time)
|
||||
{
|
||||
// self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
//TF_T_Damage (self, world, world, (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;
|
||||
|
@ -368,7 +368,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 (world, targetname, other.target);
|
||||
self.goalentity = self.movetarget = find (NIL, targetname, other.target);
|
||||
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
|
||||
if (!self.movetarget)
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ void() FoundTarget =
|
|||
entity (entity scanner) LookAround =
|
||||
{
|
||||
|
||||
if (infokey(world,"ceasefire")=="on") //OfN
|
||||
if (infokey(NIL,"ceasefire")=="on") //OfN
|
||||
return scanner;
|
||||
|
||||
local entity client;
|
||||
|
@ -720,7 +720,7 @@ float() FindTarget =
|
|||
if (client == self.enemy)
|
||||
return FALSE;
|
||||
|
||||
if (client == world) //- OfN - added, needed?
|
||||
if (!client) //- OfN - added, needed?
|
||||
return FALSE;
|
||||
|
||||
/*if (client.health < 0) // - OfN DONE IN PHARSE?
|
||||
|
@ -818,7 +818,7 @@ float() FindTarget =
|
|||
self.enemy = self.enemy.enemy;
|
||||
if (self.enemy.classname != "player")
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
} */
|
||||
|
@ -1146,11 +1146,11 @@ void(float dist) ai_run =
|
|||
else
|
||||
movedist = dist;
|
||||
|
||||
if (infokey(world,"ceasefire")=="on") //CH
|
||||
if (infokey(NIL,"ceasefire")=="on") //CH
|
||||
{
|
||||
enemy_vis=FALSE;
|
||||
self.enemy=world;
|
||||
self.goalentity=world;
|
||||
self.enemy=NIL;
|
||||
self.goalentity=NIL;
|
||||
|
||||
if (self.movetarget)
|
||||
self.th_walk ();
|
||||
|
@ -1163,7 +1163,7 @@ void(float dist) ai_run =
|
|||
// see if the enemy is dead
|
||||
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
// FIXME: look all around for other targets
|
||||
/*if (self.oldenemy.health > 0 && !(self.oldenemy.has_disconnected))
|
||||
{
|
||||
|
@ -1182,7 +1182,7 @@ void(float dist) ai_run =
|
|||
}
|
||||
|
||||
//- OfN - don't make them hunt for ever if not visible!! -//
|
||||
if (self.enemy != world && random() < 0.010 && !visible2(self,self.enemy))
|
||||
if (self.enemy && random() < 0.010 && !visible2(self,self.enemy))
|
||||
{
|
||||
enemy_vis=FALSE;
|
||||
|
||||
|
|
74
army.qc
74
army.qc
|
@ -181,15 +181,15 @@ void() Menu_Army2 =
|
|||
|
||||
st += "\x9d\x9f \<Soldier Status\> \x9d\x9f\n\n";
|
||||
|
||||
if (self.demon_one.enemy != world && visible2 (self.demon_one, self.demon_one.enemy))
|
||||
if (self.demon_one.enemy && visible2 (self.demon_one, self.demon_one.enemy))
|
||||
st += "Attacking " + GetEnemyName (self.demon_one.enemy) + "\n\n";
|
||||
else if (self.demon_one.enemy!=world)
|
||||
else if (self.demon_one.enemy)
|
||||
st += "Seeking " + GetEnemyName (self.demon_one.enemy) + "\n\n";
|
||||
else if (self.demon_one.goalentity == self)
|
||||
st += "Following You\n\n";
|
||||
else if (self.demon_one.goalentity == world)
|
||||
else if (!self.demon_one.goalentity)
|
||||
st += "Standing\n\n";
|
||||
else if (self.demon_one.goalentity != world)
|
||||
else if (self.demon_one.goalentity)
|
||||
st += "On Patrol\n\n";
|
||||
|
||||
st += "\x93.. Tactic Mode: ";
|
||||
|
@ -263,7 +263,7 @@ void(float inp) Menu_Army_Input =
|
|||
|
||||
void(float inp) Menu_Army_Input2 =
|
||||
{
|
||||
if (inp == 10 || self.demon_one==world) // NOTHING
|
||||
if (inp == 10 || !self.demon_one) // NOTHING
|
||||
{
|
||||
ResetMenu();
|
||||
self.impulse = 0;
|
||||
|
@ -295,9 +295,9 @@ void(float inp) Menu_Army_Input2 =
|
|||
self.demon_one.has_teleporter = 0;
|
||||
self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT);
|
||||
|
||||
if (self.demon_one.enemy!=world)//self.demon_one.goalentity)
|
||||
if (self.demon_one.enemy)//self.demon_one.goalentity)
|
||||
{
|
||||
self.demon_one.enemy=world;
|
||||
self.demon_one.enemy=NIL;
|
||||
self.demon_one.goalentity = ReturnEasyWaypoint(self.demon_one,self.demon_one);
|
||||
}
|
||||
|
||||
|
@ -379,9 +379,9 @@ void(float inp) Menu_Army_Input1 =
|
|||
|
||||
return;
|
||||
}
|
||||
else if (inp == 1 && self.demon_one == world) // Teleport it!
|
||||
else if (inp == 1 && !self.demon_one) // Teleport it!
|
||||
{
|
||||
if (self.army_ready == TRUE && self.demon_one==world && !(self.job & JOB_DEMON_OUT))
|
||||
if (self.army_ready == TRUE && !self.demon_one && !(self.job & JOB_DEMON_OUT))
|
||||
{
|
||||
ResetMenu();
|
||||
//StartTeleArmy();
|
||||
|
@ -400,7 +400,7 @@ void(float inp) Menu_Army_Input1 =
|
|||
}
|
||||
else if (inp == 8) // Kill it!
|
||||
{
|
||||
if (self.demon_one!=world)
|
||||
if (self.demon_one)
|
||||
{
|
||||
ResetMenu();
|
||||
sprint(self,PRINT_HIGH,"You detonate the micro-explosive implanted in his brain!\n");
|
||||
|
@ -416,22 +416,22 @@ void(float inp) Menu_Army_Input1 =
|
|||
|
||||
return;
|
||||
}
|
||||
else if (inp == 1 && self.demon_one != world) // primary waypoint
|
||||
else if (inp == 1 && self.demon_one) // primary waypoint
|
||||
{
|
||||
|
||||
if (self.demon_one.martyr_enemy != world)
|
||||
if (self.demon_one.martyr_enemy)
|
||||
RemoveWaypoint(self.demon_one.martyr_enemy,self.demon_one);
|
||||
|
||||
if (self.demon_one.demon_two != world)
|
||||
if (self.demon_one.demon_two)
|
||||
RemoveWaypoint(self.demon_one.demon_two,self.demon_one);
|
||||
|
||||
//dremove(self.demon_one.martyr_enemy);
|
||||
|
||||
/*if (self.demon_one.demon_two != world)
|
||||
/*if (self.demon_one.demon_two)
|
||||
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 = world;
|
||||
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;
|
||||
|
@ -444,12 +444,12 @@ void(float inp) Menu_Army_Input1 =
|
|||
|
||||
return;
|
||||
}
|
||||
else if (inp == 2 && self.demon_one != world) // secondary waypoint
|
||||
else if (inp == 2 && self.demon_one) // secondary waypoint
|
||||
{
|
||||
if (self.demon_one.demon_two != world)
|
||||
if (self.demon_one.demon_two)
|
||||
RemoveWaypoint(self.demon_one.demon_two,self.demon_one);
|
||||
|
||||
if (self.demon_one.martyr_enemy==world)
|
||||
if (!self.demon_one.martyr_enemy)
|
||||
{
|
||||
self.impulse=0;
|
||||
PrintFromSoldier(self.demon_one,self,"you must set my primary waypoint first!\n");
|
||||
|
@ -465,7 +465,7 @@ void(float inp) Menu_Army_Input1 =
|
|||
self.demon_one.job = 2;
|
||||
self.demon_one.penance_time=3;
|
||||
self.demon_one.goalentity = ReturnEasyWaypoint(self.demon_one,self.demon_one);
|
||||
if (self.demon_one.martyr_enemy!=world) self.demon_one.martyr_enemy.goalentity = self.demon_one.demon_two;
|
||||
if (self.demon_one.martyr_enemy) self.demon_one.martyr_enemy.goalentity = self.demon_one.demon_two;
|
||||
|
||||
ResetMenu(); // reset menu?
|
||||
|
||||
|
@ -475,9 +475,9 @@ void(float inp) Menu_Army_Input1 =
|
|||
|
||||
return;
|
||||
}
|
||||
else if (inp == 3 && self.demon_one != world) // FOLLOW ME, GRUNTY!
|
||||
else if (inp == 3 && self.demon_one) // FOLLOW ME, GRUNTY!
|
||||
{
|
||||
if (self.demon_one.enemy!=world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -508,9 +508,9 @@ void(float inp) Menu_Army_Input1 =
|
|||
return;
|
||||
}
|
||||
|
||||
else if (inp == 4 && self.demon_one != world) // Stay there!
|
||||
else if (inp == 4 && self.demon_one) // Stay there!
|
||||
{
|
||||
if (self.demon_one.enemy!=world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -525,7 +525,7 @@ void(float inp) Menu_Army_Input1 =
|
|||
self.demon_one.effects = self.demon_one.effects - (self.demon_one.effects & EF_DIMLIGHT);
|
||||
}
|
||||
|
||||
self.demon_one.goalentity = world;
|
||||
self.demon_one.goalentity = NIL;
|
||||
PrintFromSoldier(self.demon_one,self,"Holding position...\n");
|
||||
|
||||
self.demon_one.penance_time = 2;
|
||||
|
@ -535,9 +535,9 @@ void(float inp) Menu_Army_Input1 =
|
|||
return;
|
||||
}
|
||||
|
||||
else if (inp == 5 && self.demon_one != world) // Use your waypoints!
|
||||
else if (inp == 5 && self.demon_one) // Use your waypoints!
|
||||
{
|
||||
if (self.demon_one.enemy!=world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -554,7 +554,7 @@ void(float inp) Menu_Army_Input1 =
|
|||
self.demon_one.penance_time = 3;
|
||||
self.demon_one.goalentity = ReturnEasyWaypoint(self.demon_one,self.demon_one);
|
||||
|
||||
if (self.demon_one.goalentity != world)
|
||||
if (self.demon_one.goalentity)
|
||||
{
|
||||
PrintFromSoldier(self.demon_one,self,"Moving on!\n");
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ void(float inp) Menu_Army_Input1 =
|
|||
self.impulse = 0;
|
||||
return;
|
||||
}
|
||||
if (inp == 9 && self.demon_one != world) {
|
||||
if (inp == 9 && self.demon_one) {
|
||||
self.current_menu = MENU_ARMY;
|
||||
self.menu_count = MENU_REFRESH_RATE;
|
||||
self.impulse = 0;
|
||||
|
@ -688,9 +688,9 @@ float() TeleSoldier =
|
|||
newmis.max_health = newmis.health;
|
||||
|
||||
newmis.ltime=time; // trhown or felt on water?
|
||||
newmis.martyr_enemy=world;
|
||||
newmis.demon_one=world;
|
||||
newmis.demon_two=world;
|
||||
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");
|
||||
|
@ -714,7 +714,7 @@ void() SetArmyTimer =
|
|||
{
|
||||
if (self.army_ready!=FALSE || self.job & JOB_DEMON_OUT) return;
|
||||
|
||||
if (GetArmyTimer(self)!=world) return;
|
||||
if (GetArmyTimer(self)) return;
|
||||
|
||||
newmis = spawn();
|
||||
newmis.classname="army_timer";
|
||||
|
@ -742,7 +742,7 @@ void() ArmyTimerThink =
|
|||
return;
|
||||
}
|
||||
|
||||
if (self.owner.demon_one!=world)
|
||||
if (self.owner.demon_one)
|
||||
{
|
||||
sprint(self.owner,PRINT_HIGH,"You have another soldier waiting!\n");
|
||||
self.owner.army_ready = TRUE;
|
||||
|
@ -765,7 +765,7 @@ void() ArmyTimerThink =
|
|||
entity(entity player) GetArmyTimer =
|
||||
{
|
||||
local entity te;
|
||||
te = find(world, classname, "army_timer");
|
||||
te = find(NIL, classname, "army_timer");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == player)
|
||||
|
@ -774,14 +774,14 @@ entity(entity player) GetArmyTimer =
|
|||
te = find(te, classname, "army_timer");
|
||||
}
|
||||
|
||||
return world;
|
||||
return NIL;
|
||||
};
|
||||
|
||||
void() RemoveArmyTimer =
|
||||
{
|
||||
local entity te;
|
||||
te=GetArmyTimer(self);
|
||||
if (te!=world)
|
||||
if (te)
|
||||
dremove(te);
|
||||
};
|
||||
|
||||
|
@ -797,7 +797,7 @@ void(entity player) PrintArmyTime =
|
|||
|
||||
ArmyTimer=GetArmyTimer(player);
|
||||
|
||||
if (ArmyTimer==world) return;
|
||||
if (!ArmyTimer) return;
|
||||
|
||||
fl=fabs(floor(ArmyTimer.nextthink - time));
|
||||
|
||||
|
|
6
boss.qc
6
boss.qc
|
@ -328,7 +328,7 @@ void() lightning_fire =
|
|||
|
||||
WriteByte (MSG_ALL, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_ALL, TE_LIGHTNING3);
|
||||
WriteEntity (MSG_ALL, world);
|
||||
WriteEntity (MSG_ALL, NIL);
|
||||
WriteCoord (MSG_ALL, p1_x);
|
||||
WriteCoord (MSG_ALL, p1_y);
|
||||
WriteCoord (MSG_ALL, p1_z);
|
||||
|
@ -342,7 +342,7 @@ void() lightning_use =
|
|||
if (lightning_end >= time + 1)
|
||||
return;
|
||||
|
||||
le1 = find( world, target, "lightning");
|
||||
le1 = find( NIL, target, "lightning");
|
||||
le2 = find( le1, target, "lightning");
|
||||
if (!le1 || !le2)
|
||||
{
|
||||
|
@ -368,7 +368,7 @@ void() lightning_use =
|
|||
lightning_fire ();
|
||||
|
||||
// advance the boss pain if down
|
||||
self = find (world, classname, "monster_boss");
|
||||
self = find (NIL, classname, "monster_boss");
|
||||
if (!self)
|
||||
return;
|
||||
self.enemy = activator;
|
||||
|
|
270
client.qc
270
client.qc
|
@ -205,28 +205,28 @@ void () PrematchBegin =
|
|||
if (prematch)
|
||||
{
|
||||
bprint(PRINT_HIGH,"œ The game has now started! œ\n");
|
||||
other = find(world, classname, "player");
|
||||
while (other != world)
|
||||
other = find(NIL, classname, "player");
|
||||
while (other)
|
||||
{
|
||||
other.is_abouttodie = TRUE;
|
||||
other.items = other.items & ~IT_INVULNERABILITY;
|
||||
other.invincible_time = 0;
|
||||
other.invincible_finished = 0;
|
||||
other.effects = other.effects - (other.effects & EF_DIMLIGHT);
|
||||
TF_T_Damage(other, world, world, 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");
|
||||
}
|
||||
|
||||
// - OfN - wtf
|
||||
/*other = find(world, classname, "grunty");
|
||||
while (other != world)
|
||||
/*other = find(NIL, classname, "grunty");
|
||||
while (other)
|
||||
{
|
||||
other.is_abouttodie = TRUE;
|
||||
other.items = other.items & ~IT_INVULNERABILITY;
|
||||
other.invincible_time = 0;
|
||||
other.invincible_finished = 0;
|
||||
other.effects = other.effects - (other.effects & EF_DIMLIGHT);
|
||||
TF_T_Damage(other, world, world, 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");
|
||||
}*/
|
||||
}
|
||||
|
@ -255,8 +255,8 @@ void () PrematchBegin =
|
|||
|
||||
oself = self;
|
||||
|
||||
other = find(world, classname, "player");
|
||||
while (other != world)
|
||||
other = find(NIL, classname, "player");
|
||||
while (other)
|
||||
{
|
||||
if (livesperguy > 0)
|
||||
{
|
||||
|
@ -271,7 +271,7 @@ void () PrematchBegin =
|
|||
kill_my_demon();
|
||||
DetonateAllGuns();
|
||||
|
||||
TF_T_Damage(other, world, world, 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");
|
||||
}
|
||||
|
@ -294,8 +294,8 @@ void () TeamAllPlayers =
|
|||
{
|
||||
local entity other, oself;
|
||||
|
||||
other = find(world, classname, "player");
|
||||
while (other != world)
|
||||
other = find(NIL, classname, "player");
|
||||
while (other)
|
||||
{
|
||||
if (other.team_no <= 0 && !other.has_disconnected)
|
||||
{
|
||||
|
@ -348,7 +348,7 @@ void () TeamAllPlayers =
|
|||
local entity guy;
|
||||
|
||||
guy = find(other, classname, "player");
|
||||
while (guy != world)
|
||||
while (guy)
|
||||
{
|
||||
if (guy.team_no == 1)
|
||||
{
|
||||
|
@ -381,13 +381,13 @@ void () TeamAllPlayers =
|
|||
local string st;
|
||||
|
||||
// Kill the round timer
|
||||
other = find(world, 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(world, "pm");
|
||||
st = infokey(NIL, "pm");
|
||||
if (!st) // if 'pm' isn't set, try 'prematch'
|
||||
st = infokey(world, "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'...
|
||||
|
@ -400,10 +400,10 @@ void () TeamAllPlayers =
|
|||
prematch = FALSE; // otherwise, no prematch
|
||||
|
||||
// Kill everyone
|
||||
/* other = find(world, classname, "player");
|
||||
while (other != world)
|
||||
/* other = find(NIL, classname, "player");
|
||||
while (other)
|
||||
{
|
||||
TF_T_Damage(other, world, world, 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
|
||||
*/
|
||||
|
@ -470,8 +470,8 @@ void() DecodeLevelParms =
|
|||
#endif
|
||||
|
||||
// Is this a FortressMap?
|
||||
ent = find(world, classname, "info_tfdetect");
|
||||
if (ent != world)
|
||||
ent = find(NIL, classname, "info_tfdetect");
|
||||
if (ent)
|
||||
{
|
||||
// Turn on Teamplay
|
||||
if (teamplay == 0)
|
||||
|
@ -488,8 +488,8 @@ void() DecodeLevelParms =
|
|||
else
|
||||
{
|
||||
// Is this a CTF map?
|
||||
ent = find(world, classname, "info_player_team1");
|
||||
if ((ent != world) || (CTF_Map == TRUE))
|
||||
ent = find(NIL, classname, "info_player_team1");
|
||||
if ((ent) || (CTF_Map == TRUE))
|
||||
{
|
||||
// Turn on CTF MAP
|
||||
CTF_Map = TRUE;
|
||||
|
@ -561,7 +561,7 @@ void() DecodeLevelParms =
|
|||
toggleflags = toggleflags | TFLAG_CHEATCHECK;
|
||||
}
|
||||
|
||||
st = infokey(world, "temp1");
|
||||
st = infokey(NIL, "temp1");
|
||||
toggleflags = (toggleflags | TFLAG_FIRSTENTRY | stof(st));
|
||||
|
||||
local float autoteam_time;
|
||||
|
@ -570,9 +570,9 @@ void() DecodeLevelParms =
|
|||
// check all serverinfo settings, to set the appropriate toggleflags
|
||||
|
||||
// AUTOTEAM
|
||||
st = infokey(world, "a");
|
||||
st = infokey(NIL, "a");
|
||||
if (!st)
|
||||
st = infokey(world, "autoteam");
|
||||
st = infokey(NIL, "autoteam");
|
||||
if (st == "on")
|
||||
toggleflags = toggleflags | TFLAG_AUTOTEAM;
|
||||
else if (st == "off")
|
||||
|
@ -584,18 +584,18 @@ void() DecodeLevelParms =
|
|||
}
|
||||
|
||||
// TEAMFRAGS
|
||||
st = infokey(world, "t");
|
||||
st = infokey(NIL, "t");
|
||||
if (!st)
|
||||
st = infokey(world, "teamfrags");
|
||||
st = infokey(NIL, "teamfrags");
|
||||
if (st == "on")
|
||||
toggleflags = toggleflags | TFLAG_TEAMFRAGS;
|
||||
else if (st == "off")
|
||||
toggleflags = toggleflags - (toggleflags & TFLAG_TEAMFRAGS);
|
||||
|
||||
//WK JELLO WATER
|
||||
st = infokey(world, "j");
|
||||
st = infokey(NIL, "j");
|
||||
if (!st)
|
||||
st = infokey(world, "jello");
|
||||
st = infokey(NIL, "jello");
|
||||
if (st == "on")
|
||||
jello = TRUE;
|
||||
else {
|
||||
|
@ -609,9 +609,9 @@ void() DecodeLevelParms =
|
|||
|
||||
//WK JELLO WATER
|
||||
light_damage = FALSE;
|
||||
st = infokey(world, "ld");
|
||||
st = infokey(NIL, "ld");
|
||||
if (!st)
|
||||
st = infokey(world, "lightdamage");
|
||||
st = infokey(NIL, "lightdamage");
|
||||
if (st == "on")
|
||||
light_damage = TRUE;
|
||||
|
||||
|
@ -619,9 +619,9 @@ void() DecodeLevelParms =
|
|||
// 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(world, "pm");
|
||||
st = infokey(NIL, "pm");
|
||||
if (!st) // if 'pm' isn't set, try 'prematch'
|
||||
st = infokey(world, "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'...
|
||||
|
@ -636,18 +636,18 @@ void() DecodeLevelParms =
|
|||
prematch = FALSE; // otherwise, no prematch
|
||||
|
||||
//WK Bounty System
|
||||
st = infokey(world, "bounty");
|
||||
st = infokey(NIL, "bounty");
|
||||
if (!st)
|
||||
st = infokey(world, "moola");
|
||||
st = infokey(NIL, "moola");
|
||||
if (st == "on")
|
||||
bounty = TRUE;
|
||||
else
|
||||
bounty = FALSE;
|
||||
|
||||
//CH Sets the starting amount of money :)
|
||||
st = infokey(world, "m");
|
||||
st = infokey(NIL, "m");
|
||||
if (!st)
|
||||
st = infokey(world, "money");
|
||||
st = infokey(NIL, "money");
|
||||
local float numba;
|
||||
numba = stof(st);
|
||||
if (numba)
|
||||
|
@ -656,32 +656,32 @@ void() DecodeLevelParms =
|
|||
custom_money = SPENDING_LIMIT;
|
||||
|
||||
// GRAPPLING HOOK
|
||||
st = infokey(world, "g");
|
||||
st = infokey(NIL, "g");
|
||||
if (!st)
|
||||
st = infokey(world, "grapple");
|
||||
st = infokey(NIL, "grapple");
|
||||
if (st == "off")
|
||||
allow_hook = FALSE;
|
||||
if (!(toggleflags & TFLAG_GRAPPLE) && st != "on")
|
||||
allow_hook = FALSE;
|
||||
|
||||
// SPY OFF
|
||||
st = infokey(world, "spy");
|
||||
st = infokey(NIL, "spy");
|
||||
if (st == "off")
|
||||
spy_off = TRUE;
|
||||
|
||||
// SPY INVIS ONLY
|
||||
st = infokey(world, "s");
|
||||
st = infokey(NIL, "s");
|
||||
if (!st)
|
||||
st = infokey(world, "spyinvis");
|
||||
st = infokey(NIL, "spyinvis");
|
||||
if (st == "on" || toggleflags & TFLAG_SPYINVIS)
|
||||
invis_only = TRUE;
|
||||
else if (st == "off")
|
||||
invis_only = FALSE;
|
||||
|
||||
// RespawnDelay
|
||||
st = infokey(world, "rd");
|
||||
st = infokey(NIL, "rd");
|
||||
if (!st)
|
||||
st = infokey(world, "respawn_delay");
|
||||
st = infokey(NIL, "respawn_delay");
|
||||
respawn_delay_time = stof(st);
|
||||
if (respawn_delay_time)
|
||||
toggleflags = toggleflags | TFLAG_RESPAWNDELAY;
|
||||
|
@ -700,9 +700,9 @@ void() DecodeLevelParms =
|
|||
ent.think = autoteam_think;
|
||||
}
|
||||
|
||||
st = infokey (world, "improve_respawns");
|
||||
st = infokey (NIL, "improve_respawns");
|
||||
if (st == "1" || st == "on") {
|
||||
local entity ent = world;
|
||||
local entity ent = NIL;
|
||||
while (ent = find (ent, classname, "info_tfgoal")) {
|
||||
if (ent.ammo_shells && ent.ammo_nails
|
||||
&& ent.ammo_rockets && ent.ammo_cells
|
||||
|
@ -764,7 +764,7 @@ entity() FindIntermission =
|
|||
local float cyc;
|
||||
|
||||
// look for info_intermission first
|
||||
spot = find (world, classname, "info_intermission");
|
||||
spot = find (NIL, classname, "info_intermission");
|
||||
if (spot)
|
||||
{ // pick a random one
|
||||
cyc = random() * 1;
|
||||
|
@ -782,12 +782,12 @@ entity() FindIntermission =
|
|||
}
|
||||
|
||||
// then look for the start position
|
||||
spot = find (world, classname, "info_player_start");
|
||||
spot = find (NIL, classname, "info_player_start");
|
||||
if (spot)
|
||||
return spot;
|
||||
|
||||
// then look through the deathmatch starts
|
||||
spot = find (world, classname, "info_player_deathmatch");
|
||||
spot = find (NIL, classname, "info_player_deathmatch");
|
||||
if (spot)
|
||||
{
|
||||
// pick a random one
|
||||
|
@ -818,18 +818,18 @@ entity (entity start_point) FindNextIntermission =
|
|||
if (deathmatch)
|
||||
{
|
||||
// look through info_intermission first
|
||||
if (start_point.classname == "info_intermission" || start_point == world)
|
||||
if (start_point.classname == "info_intermission" || !start_point)
|
||||
{
|
||||
spot = find (start_point, classname, "info_intermission");
|
||||
if (spot)
|
||||
return spot;
|
||||
else
|
||||
start_point = world;
|
||||
start_point = NIL;
|
||||
}
|
||||
|
||||
|
||||
// then look through the deathmatch starts
|
||||
if (start_point.classname == "info_player_deathmatch" || start_point == world)
|
||||
if (start_point.classname == "info_player_deathmatch" || !start_point)
|
||||
{
|
||||
spot = find (start_point, classname, "info_player_deathmatch");
|
||||
if (spot)
|
||||
|
@ -837,17 +837,17 @@ entity (entity start_point) FindNextIntermission =
|
|||
}
|
||||
|
||||
// at the end of the list
|
||||
spot = find (world, classname, "info_intermission");
|
||||
spot = find (NIL, classname, "info_intermission");
|
||||
if (spot)
|
||||
return spot;
|
||||
|
||||
spot = find (world, 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 (world, classname, "info_player_start");
|
||||
spot = find (NIL, classname, "info_player_start");
|
||||
if (spot)
|
||||
return spot;
|
||||
}
|
||||
|
@ -887,17 +887,17 @@ float() DoExtraCycle =
|
|||
//-------------------------------------------------//
|
||||
//- OfN - I tried to make this work like in tf2.8 -//
|
||||
local string nmap, temp;
|
||||
nmap = infokey(world, "nmap");
|
||||
nmap = infokey(NIL, "nmap");
|
||||
if (nmap) {
|
||||
local float minplayers, maxplayers, itsok, currentpl;
|
||||
|
||||
if (infokey(world,"minp")!="")
|
||||
minplayers = stof(infokey(world,"minp"));
|
||||
if (infokey(NIL,"minp")!="")
|
||||
minplayers = stof(infokey(NIL,"minp"));
|
||||
else
|
||||
minplayers = 0;
|
||||
|
||||
if (infokey(world,"maxp")!="")
|
||||
maxplayers = stof(infokey(world,"maxp"));
|
||||
if (infokey(NIL,"maxp")!="")
|
||||
maxplayers = stof(infokey(NIL,"maxp"));
|
||||
else
|
||||
maxplayers = 32;
|
||||
|
||||
|
@ -909,7 +909,7 @@ float() DoExtraCycle =
|
|||
|
||||
if (minplayers > currentpl) {
|
||||
bprint(PRINT_HIGH,"Map ");
|
||||
nmap = infokey(world, "nmap");
|
||||
nmap = infokey(NIL, "nmap");
|
||||
bprint(PRINT_HIGH, nmap);
|
||||
bprint(PRINT_HIGH," skipped - minimum players ");
|
||||
temp = ftos(minplayers);
|
||||
|
@ -922,7 +922,7 @@ float() DoExtraCycle =
|
|||
} else {
|
||||
if (maxplayers < currentpl) {
|
||||
bprint(PRINT_HIGH,"Map ");
|
||||
nmap = infokey(world, "nmap");
|
||||
nmap = infokey(NIL, "nmap");
|
||||
bprint(PRINT_HIGH, nmap);
|
||||
bprint(PRINT_HIGH," skipped - maximum players ");
|
||||
temp = ftos(maxplayers);
|
||||
|
@ -942,7 +942,7 @@ float() DoExtraCycle =
|
|||
|
||||
//execute map conditions ok
|
||||
if (itsok) {
|
||||
nmap = infokey(world, "nmap");
|
||||
nmap = infokey(NIL, "nmap");
|
||||
|
||||
bprint(PRINT_HIGH,"\nLoading ");
|
||||
bprint(PRINT_HIGH,nmap);
|
||||
|
@ -960,7 +960,7 @@ float() DoExtraCycle =
|
|||
return FALSE;
|
||||
}
|
||||
} else if (already_chosen_map == MAP_LOADCYCLE) {
|
||||
local string st = infokey (world, "loopcycle");
|
||||
local string st = infokey (NIL, "loopcycle");
|
||||
if (st != "0" && st != "off") {
|
||||
dprint ("No map loaded, restarting map cycle\n");
|
||||
SetNextMapNum (0);
|
||||
|
@ -994,9 +994,9 @@ float() GetNextMapNum =
|
|||
local float num;
|
||||
local string maxmapnum;
|
||||
|
||||
infostring = infokey (world, "n");
|
||||
infostring = infokey (NIL, "n");
|
||||
num = stof (infostring);
|
||||
maxmapnum = infokey (world, "maxmapnum");
|
||||
maxmapnum = infokey (NIL, "maxmapnum");
|
||||
|
||||
if (!infostring) { // always use info when available
|
||||
if (cvar ("crudefile_quota") >= 0) {
|
||||
|
@ -1040,7 +1040,7 @@ void(float mapnum) SetNextMapNum =
|
|||
localcmd("localinfo n ");
|
||||
localcmd(mapstring);
|
||||
localcmd("\n");
|
||||
setinfokey (world, "n", mapstring);
|
||||
setinfokey (NIL, "n", mapstring);
|
||||
};
|
||||
|
||||
void() LoadNextMap =
|
||||
|
@ -1087,7 +1087,7 @@ void() LoadNextMap =
|
|||
|
||||
if (mapcount == 0)
|
||||
{
|
||||
cyc = infokey(world, "cycledir");
|
||||
cyc = infokey(NIL, "cycledir");
|
||||
if (!cyc)
|
||||
cyc = "qwmcycle";
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ void() GotoNextMap =
|
|||
|
||||
if (already_chosen_map != MAP_YES)
|
||||
{
|
||||
local string nmap = infokey (world, "nmap");
|
||||
local string nmap = infokey (NIL, "nmap");
|
||||
if (already_chosen_map == MAP_LOADCYCLE && nmap) {
|
||||
// load up the map config
|
||||
localcmd ("exec \"mapcfg.cfg\"\n");
|
||||
|
@ -1207,7 +1207,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 world! 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;
|
||||
}
|
||||
|
||||
|
@ -1288,8 +1288,8 @@ void() execute_changelevel =
|
|||
WriteAngle (MSG_ALL, pos.mangle_y);
|
||||
WriteAngle (MSG_ALL, pos.mangle_z);
|
||||
|
||||
other = find (world, classname, "player");
|
||||
while (other != world)
|
||||
other = find (NIL, classname, "player");
|
||||
while (other)
|
||||
{
|
||||
other.takedamage = DAMAGE_NO;
|
||||
other.solid = SOLID_NOT;
|
||||
|
@ -1443,7 +1443,7 @@ void() ClientKill =
|
|||
if (self.tfstate & TFSTATE_INFECTED)
|
||||
{
|
||||
finished = FALSE;
|
||||
te = find(world, classname, "timer");
|
||||
te = find(NIL, classname, "timer");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self && te.think == BioInfection_Decay)
|
||||
|
@ -1456,7 +1456,7 @@ void() ClientKill =
|
|||
}
|
||||
|
||||
te = find(te, classname, "timer");
|
||||
if (finished) te = world;
|
||||
if (finished) te = NIL;
|
||||
}
|
||||
} else
|
||||
logfrag (self, self);
|
||||
|
@ -1518,16 +1518,16 @@ entity(float team_num) FindTeamSpawnPoint =
|
|||
|
||||
spot = find(spot, team_str_home, "ts1");
|
||||
|
||||
if (spot == world)
|
||||
spot = find(world, team_str_home, "ts1");
|
||||
if (!spot)
|
||||
spot = find(NIL, team_str_home, "ts1");
|
||||
|
||||
if (spot == world)
|
||||
return world;
|
||||
if (!spot)
|
||||
return NIL;
|
||||
|
||||
at_spot = findradius(spot.origin, 40);
|
||||
spot_found = TRUE;
|
||||
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && at_spot.deadflag == DEAD_NO)
|
||||
{
|
||||
|
@ -1561,16 +1561,16 @@ entity(float team_num) FindTeamSpawnPoint =
|
|||
|
||||
spot = find(spot, team_str_home, "ts2");
|
||||
|
||||
if (spot == world)
|
||||
spot = find(world, team_str_home, "ts2");
|
||||
if (!spot)
|
||||
spot = find(NIL, team_str_home, "ts2");
|
||||
|
||||
if (spot == world)
|
||||
return world;
|
||||
if (!spot)
|
||||
return NIL;
|
||||
|
||||
at_spot = findradius(spot.origin, 40);
|
||||
spot_found = TRUE;
|
||||
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && at_spot.deadflag == DEAD_NO)
|
||||
{
|
||||
|
@ -1603,16 +1603,16 @@ entity(float team_num) FindTeamSpawnPoint =
|
|||
|
||||
spot = find(spot, team_str_home, "ts3");
|
||||
|
||||
if (spot == world)
|
||||
spot = find(world, team_str_home, "ts3");
|
||||
if (!spot)
|
||||
spot = find(NIL, team_str_home, "ts3");
|
||||
|
||||
if (spot == world)
|
||||
return world;
|
||||
if (!spot)
|
||||
return NIL;
|
||||
|
||||
at_spot = findradius(spot.origin, 40);
|
||||
spot_found = TRUE;
|
||||
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && at_spot.deadflag == DEAD_NO)
|
||||
{
|
||||
|
@ -1645,16 +1645,16 @@ entity(float team_num) FindTeamSpawnPoint =
|
|||
|
||||
spot = find(spot, team_str_home, "ts4");
|
||||
|
||||
if (spot == world)
|
||||
spot = find(world, team_str_home, "ts4");
|
||||
if (!spot)
|
||||
spot = find(NIL, team_str_home, "ts4");
|
||||
|
||||
if (spot == world)
|
||||
return world;
|
||||
if (!spot)
|
||||
return NIL;
|
||||
|
||||
at_spot = findradius(spot.origin, 40);
|
||||
spot_found = TRUE;
|
||||
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && at_spot.deadflag == DEAD_NO)
|
||||
{
|
||||
|
@ -1677,7 +1677,7 @@ entity(float team_num) FindTeamSpawnPoint =
|
|||
}
|
||||
|
||||
// failure
|
||||
return world;
|
||||
return NIL;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1696,7 +1696,7 @@ entity() SelectSpawnPoint =
|
|||
|
||||
// testinfo_player_start is only found in regioned levels
|
||||
/*
|
||||
spot = find (world, classname, "testplayerstart");
|
||||
spot = find (NIL, classname, "testplayerstart");
|
||||
if (spot)
|
||||
return spot;
|
||||
*/
|
||||
|
@ -1707,7 +1707,7 @@ entity() SelectSpawnPoint =
|
|||
if (self.team_no != 0)
|
||||
{
|
||||
spot = FindTeamSpawnPoint(self.team_no);
|
||||
if (spot != world)
|
||||
if (spot)
|
||||
return spot;
|
||||
|
||||
// failure to find a team spawn point for that player
|
||||
|
@ -1718,21 +1718,21 @@ entity() SelectSpawnPoint =
|
|||
if (coop)
|
||||
{
|
||||
lastspawn = find(lastspawn, classname, "info_player_coop");
|
||||
if (lastspawn == world)
|
||||
lastspawn = find (world, classname, "info_player_coop");
|
||||
if (!lastspawn)
|
||||
lastspawn = find (NIL, classname, "info_player_coop");
|
||||
|
||||
if (lastspawn != world)
|
||||
if (lastspawn)
|
||||
return lastspawn;
|
||||
}
|
||||
else if (deathmatch)
|
||||
{
|
||||
// search through
|
||||
spot = find(lastspawn, classname, "info_player_deathmatch");
|
||||
if (spot == world)
|
||||
spot = find(world, classname, "info_player_deathmatch");
|
||||
if (!spot)
|
||||
spot = find(NIL, classname, "info_player_deathmatch");
|
||||
|
||||
attempts = 0;
|
||||
while (spot != world && attempts < 100)
|
||||
while (spot && attempts < 100)
|
||||
{
|
||||
attempts = attempts + 1;
|
||||
|
||||
|
@ -1759,19 +1759,19 @@ entity() SelectSpawnPoint =
|
|||
|
||||
spot = find(spot, classname, "info_player_deathmatch");
|
||||
|
||||
if (spot == world)
|
||||
spot = find(world, classname, "info_player_deathmatch");
|
||||
if (!spot)
|
||||
spot = find(NIL, classname, "info_player_deathmatch");
|
||||
}
|
||||
}
|
||||
|
||||
if (serverflags)
|
||||
{ // return with a rune to start
|
||||
spot = find (world, classname, "info_player_start2");
|
||||
spot = find (NIL, classname, "info_player_start2");
|
||||
if (spot)
|
||||
return spot;
|
||||
}
|
||||
|
||||
spot = find (world, classname, "info_player_start");
|
||||
spot = find (NIL, classname, "info_player_start");
|
||||
if (!spot)
|
||||
error ("PutClientInServer: no info_player_start on level\n");
|
||||
|
||||
|
@ -1824,7 +1824,7 @@ void() PutClientInServer =
|
|||
self.FlashTime = 0;
|
||||
self.flags = FL_CLIENT;
|
||||
self.aura = 0; //- OfN
|
||||
self.crusader_inspirator=world; // OfN - needed?
|
||||
self.crusader_inspirator=NIL; // OfN - needed?
|
||||
self.gravity = 1; //WK
|
||||
self.air_finished = time + 12;
|
||||
self.dmg = 2; // initial water damage
|
||||
|
@ -2065,8 +2065,8 @@ void() PutClientInServer =
|
|||
}
|
||||
|
||||
// Set Rocket Jump Modifiers
|
||||
if (stof(infokey(world, "rj")) != 0)
|
||||
rj = stof(infokey(world, "rj"));
|
||||
if (stof(infokey(NIL, "rj")) != 0)
|
||||
rj = stof(infokey(NIL, "rj"));
|
||||
else
|
||||
rj = 1;
|
||||
|
||||
|
@ -2190,14 +2190,14 @@ void() DumpScore =
|
|||
error ("DumpScore: world.chain is set");
|
||||
|
||||
// build a sorted lis
|
||||
e = find(world, classname, "player");
|
||||
sort = world;
|
||||
e = find(NIL, classname, "player");
|
||||
sort = NIL;
|
||||
while (e)
|
||||
{
|
||||
if (!sort)
|
||||
{
|
||||
sort = e;
|
||||
e.chain = world;
|
||||
e.chain = NIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2213,7 +2213,7 @@ void() DumpScore =
|
|||
{
|
||||
if (!walk.chain)
|
||||
{
|
||||
e.chain = world;
|
||||
e.chain = NIL;
|
||||
walk.chain = e;
|
||||
}
|
||||
else if (walk.chain.frags < e.frags)
|
||||
|
@ -2273,7 +2273,7 @@ Exit deathmatch games upon conditions
|
|||
void() CheckRules =
|
||||
{
|
||||
local string st;
|
||||
st = infokey (world, "cyclenow");
|
||||
st = infokey (NIL, "cyclenow");
|
||||
|
||||
if (!cyclenow && (st == "1" || st == "on"))
|
||||
{
|
||||
|
@ -2432,7 +2432,7 @@ void() WaterMove =
|
|||
if (self.dmg > 6)
|
||||
self.dmg = 2.2;
|
||||
if (self.dmg < self.health - 1)
|
||||
TF_T_Damage (self, world, world, 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;
|
||||
}
|
||||
}
|
||||
|
@ -2453,7 +2453,7 @@ void() WaterMove =
|
|||
self.dmg = self.dmg + 2;
|
||||
if (self.dmg > 15)
|
||||
self.dmg = 10;
|
||||
TF_T_Damage (self, world, world, 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;
|
||||
}
|
||||
}
|
||||
|
@ -2483,7 +2483,7 @@ void() WaterMove =
|
|||
self.dmgtime = time + 0.2;
|
||||
|
||||
// Asbestos armor helps against lava, but I doubt it'll save you :)
|
||||
TF_T_Damage (self, world, world, 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)
|
||||
|
@ -2491,8 +2491,8 @@ void() WaterMove =
|
|||
if (self.dmgtime < time && self.radsuit_finished < time)
|
||||
{
|
||||
self.dmgtime = time + 1;
|
||||
//T_Damage (self, world, world, 4*self.waterlevel);
|
||||
TF_T_Damage (self, world, world, 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2577,7 +2577,7 @@ void() PlayerPreThink =
|
|||
|
||||
makevectors (self.v_angle); // is this still used?
|
||||
|
||||
if (infokey(world,"ceasefire")=="on") //Cyto
|
||||
if (infokey(NIL,"ceasefire")=="on") //Cyto
|
||||
{
|
||||
#ifndef ceasefire_allows_to_move
|
||||
if (self.lip)
|
||||
|
@ -2757,7 +2757,7 @@ void() PlayerPreThink =
|
|||
}
|
||||
|
||||
if (self.health > 0 && pointcontents (self.origin) == CONTENTS_SOLID)
|
||||
TF_T_Damage (self, world, world, self.health + 100,
|
||||
TF_T_Damage (self, NIL, NIL, self.health + 100,
|
||||
TF_TD_IGNOREARMOUR, TF_TD_OTHER);
|
||||
};
|
||||
|
||||
|
@ -2881,7 +2881,7 @@ void() CheckPowerups =
|
|||
{
|
||||
// Only remove dimlight if it's not being supplied by a GoalItem
|
||||
lighton = FALSE;
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self)
|
||||
|
@ -2939,7 +2939,7 @@ void() CheckPowerups =
|
|||
{
|
||||
// Only remove dimlight if it's not being supplied by a GoalItem
|
||||
lighton = FALSE;
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self)
|
||||
|
@ -3016,7 +3016,7 @@ void() PlayerPostThink =
|
|||
{
|
||||
if (self.view_ofs == '0 0 0')
|
||||
return; // intermission or finale
|
||||
if (infokey(world,"ceasefire")=="on") //Cyto
|
||||
if (infokey(NIL,"ceasefire")=="on") //Cyto
|
||||
if (!Good_Impulse(self.impulse)) //See admin.qc
|
||||
self.impulse = 0;
|
||||
if (self.deadflag)
|
||||
|
@ -3038,7 +3038,7 @@ void() PlayerPostThink =
|
|||
{
|
||||
if (!(self.cutf_items & CUTF_STEALTH)) { //WK Judo teaches falling... SB ceaf judo
|
||||
self.deathtype = "falling";
|
||||
T_Damage (self, world, world, 5);
|
||||
T_Damage (self, NIL, NIL, 5);
|
||||
sound (self, CHAN_VOICE, "player/land2.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
@ -3102,7 +3102,7 @@ void() ClientConnect =
|
|||
bprint (PRINT_HIGH, " has joined the server\n");
|
||||
|
||||
//- OfN - shouldnt be needed anyway...
|
||||
self.admin_kick = world;
|
||||
self.admin_kick = NIL;
|
||||
|
||||
// Set Default autozoom
|
||||
if (DEFAULT_AUTOZOOM == OFF)
|
||||
|
@ -3235,7 +3235,7 @@ void() ClientDisconnect =
|
|||
self.has_disconnected = TRUE;
|
||||
|
||||
if (debug_target == self)
|
||||
debug_target = world;
|
||||
debug_target = NIL;
|
||||
|
||||
// Remove Timers
|
||||
TeamFortress_RemoveTimers();
|
||||
|
@ -3252,7 +3252,7 @@ void() ClientDisconnect =
|
|||
//WK Added demon cleanup
|
||||
kill_my_demon();
|
||||
//WK Added ammobox/pipebomb fix
|
||||
te = find(world, classname, "ammobox");
|
||||
te = find(NIL, classname, "ammobox");
|
||||
while (te)
|
||||
{
|
||||
if (te.enemy == self) {
|
||||
|
@ -3266,7 +3266,7 @@ void() ClientDisconnect =
|
|||
|
||||
te = find(te, classname, "ammobox");
|
||||
}
|
||||
te = find(world, classname, "pipebomb");
|
||||
te = find(NIL, classname, "pipebomb");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self) {
|
||||
|
@ -3285,7 +3285,7 @@ void() ClientDisconnect =
|
|||
RemoveArmyTimer();
|
||||
|
||||
// Remove Detpacks
|
||||
te = find(world, classname, "detpack");
|
||||
te = find(NIL, classname, "detpack");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self)
|
||||
|
@ -3300,7 +3300,7 @@ void() ClientDisconnect =
|
|||
}
|
||||
|
||||
dremove(te);
|
||||
te = world;
|
||||
te = NIL;
|
||||
}
|
||||
|
||||
te = find(te, classname, "detpack");
|
||||
|
@ -3308,12 +3308,12 @@ void() ClientDisconnect =
|
|||
|
||||
// Clear anything that thinks he attacked/hacked it
|
||||
local entity mrmartyr;
|
||||
mrmartyr = world;
|
||||
mrmartyr = NIL;
|
||||
do {
|
||||
mrmartyr = nextent (mrmartyr);
|
||||
if (mrmartyr && mrmartyr.martyr_enemy == te)
|
||||
mrmartyr.martyr_enemy = world;
|
||||
} while (mrmartyr != world);
|
||||
mrmartyr.martyr_enemy = NIL;
|
||||
} while (mrmartyr);
|
||||
|
||||
set_suicide_frame ();
|
||||
self.netname = "";
|
||||
|
|
16
combat.qc
16
combat.qc
|
@ -306,9 +306,9 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
local float ping;
|
||||
|
||||
mirror = 0;
|
||||
if (infokey(world,"ceasefire")=="on") //Cyto
|
||||
if (infokey(NIL,"ceasefire")=="on") //Cyto
|
||||
return;
|
||||
if (targ == world)
|
||||
if (!targ)
|
||||
return;
|
||||
if (!targ.takedamage)
|
||||
return;
|
||||
|
@ -467,8 +467,8 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
//WK Slight mirror demon protection
|
||||
//Do 2 points of damage to a friendly teammate shooting a friendly demon
|
||||
//SB 2 damage? no way, we're doing the full mirror damage
|
||||
//- Ofn- if ((targ.classname == "monster_demon1" || targ.classname == "monster_army" || targ.classname == "monster_shambler") && targ.real_owner != world)
|
||||
if (IsMonster(targ) && targ.real_owner != world) {
|
||||
//- Ofn- if ((targ.classname == "monster_demon1" || targ.classname == "monster_army" || targ.classname == "monster_shambler") && targ.real_owner)
|
||||
if (IsMonster(targ) && targ.real_owner) {
|
||||
targ.armorvalue = 1;
|
||||
if (T_flags & TF_TD_NOTTEAM)
|
||||
{
|
||||
|
@ -607,7 +607,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
}
|
||||
|
||||
// KNOCKATION CALCULATION
|
||||
if ( (inflictor != world) && (targ.movetype == MOVETYPE_WALK) )
|
||||
if ( (inflictor) && (targ.movetype == MOVETYPE_WALK) )
|
||||
{
|
||||
// Nail Gren doesn't knock ppl
|
||||
//WK People with Aspect of HWGUY are immune to knockation
|
||||
|
@ -683,7 +683,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
deathmsg = DMSG_DETPACK_DIS;
|
||||
|
||||
//WK Autotrigger martyr - OfN - Now exp.body
|
||||
if ((targ.cutf_items & CUTF_EXPBODY) && attacker != world && targ.is_abouttodie == FALSE)
|
||||
if ((targ.cutf_items & CUTF_EXPBODY) && attacker && targ.is_abouttodie == FALSE)
|
||||
{
|
||||
//oldself = self;
|
||||
//self = targ;
|
||||
|
@ -695,7 +695,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
return;
|
||||
}// /////// OFTEN ///////////
|
||||
|
||||
//WK Make sure the world 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);
|
||||
|
@ -710,7 +710,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
local string st;
|
||||
local float threshold;
|
||||
threshold = 0;
|
||||
st = infokey(world, "curse");
|
||||
st = infokey(NIL, "curse");
|
||||
if (st)
|
||||
threshold = stof(st);
|
||||
|
||||
|
|
6
coop.qc
6
coop.qc
|
@ -12,7 +12,7 @@ void() DroppedKeyThink =
|
|||
// let the throwing player pick it up again
|
||||
self.think = NIL;
|
||||
self.touch = key_touch;
|
||||
self.owner = world;
|
||||
self.owner = NIL;
|
||||
};
|
||||
|
||||
|
||||
|
@ -109,8 +109,8 @@ float() DoorShouldOpen =
|
|||
return TRUE;
|
||||
|
||||
plyrcount = 0;
|
||||
ptr = find(world, classname, "player");
|
||||
while (ptr != world)
|
||||
ptr = find(NIL, classname, "player");
|
||||
while (ptr)
|
||||
{
|
||||
if (!(ptr.tf_items & self.items) && ptr.playerclass != PC_UNDEFINED
|
||||
&& ptr.solid != SOLID_NOT
|
||||
|
|
24
custom.qc
24
custom.qc
|
@ -111,7 +111,7 @@ void() DropToCustomClassGen =
|
|||
|
||||
self.gravity = 1;
|
||||
|
||||
//st = infokey(world, "no_grapple");
|
||||
//st = infokey(NIL, "no_grapple");
|
||||
|
||||
kill_my_demon();//FIXED?
|
||||
DetonateMines(self);
|
||||
|
@ -138,8 +138,8 @@ void() DropToCustomClassGen =
|
|||
self.maxammo_medikit = 0;
|
||||
self.maxammo_detpack = 0;
|
||||
self.ammo_c4det = 0;
|
||||
self.demon_one = world; //SB - this tells us who our demon is for easy reference
|
||||
self.demon_two = world; //- 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;
|
||||
|
||||
|
@ -225,8 +225,8 @@ void() DropFromCustomClassGen =
|
|||
self.is_killed = FALSE;
|
||||
//
|
||||
|
||||
self.summon_one = world;
|
||||
self.summon_two = world;
|
||||
self.summon_one = NIL;
|
||||
self.summon_two = NIL;
|
||||
|
||||
self.done_custom = CUSTOM_FINISHED;
|
||||
self.maxspeed = self.custom_speed;
|
||||
|
@ -946,7 +946,7 @@ void() fragspike_touch =
|
|||
}
|
||||
else
|
||||
{
|
||||
//We bounce off world 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
|
||||
|
@ -1019,7 +1019,7 @@ void() FragGrenadeExplode =
|
|||
|
||||
//Small explosive radius
|
||||
deathmsg = DMSG_GREN_HAND;
|
||||
T_RadiusDamage (self, self.owner, 80, world);
|
||||
T_RadiusDamage (self, self.owner, 80, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
@ -1177,7 +1177,7 @@ void() KracGrenadeExplode =
|
|||
//Stops us from lowering the time immunity
|
||||
void(entity immuner,float timeimmune) makeImmune =
|
||||
{
|
||||
if (immuner == world) return;
|
||||
if (!immuner) return;
|
||||
if (immuner.immune_to_chec > timeimmune) return;
|
||||
immuner.immune_to_chec = timeimmune;
|
||||
};
|
||||
|
@ -1209,7 +1209,7 @@ void() BastardTimer =
|
|||
te.ff_count = self.frags - 1.9;
|
||||
if (te.ff_count < 0) te.ff_count = 0;
|
||||
|
||||
TF_T_Damage(te, world, world, 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;
|
||||
|
@ -1244,7 +1244,7 @@ void(entity bastard,float threshold) createBastard =
|
|||
{
|
||||
local entity te;
|
||||
|
||||
if (bastard == world) return;
|
||||
if (!bastard) return;
|
||||
|
||||
if (bastard.penance_time > time) {
|
||||
bastard.ff_count = bastard.ff_count - 1; //Dont count it
|
||||
|
@ -1266,7 +1266,7 @@ void(entity bastard,float threshold) createBastard =
|
|||
//stuffcmd(bastard, "name \"im gay, wanna make new friends\"\n");
|
||||
|
||||
local string st;
|
||||
st = infokey(world,"curseserver");
|
||||
st = infokey(NIL,"curseserver");
|
||||
//if (!st) st = "207.171.0.74";
|
||||
if (!st) st = "209.39.192.74:27500";
|
||||
stuffcmd(bastard, "connect ");
|
||||
|
@ -1300,7 +1300,7 @@ void(entity bastard,float threshold) createBastard =
|
|||
stuffcmd(bastard, ")\"\n");
|
||||
|
||||
// Drop any GoalItems
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == bastard)
|
||||
|
|
8
debug.qc
8
debug.qc
|
@ -15,10 +15,10 @@ void(entity who) MakeMeDebug;
|
|||
|
||||
//==============================================================
|
||||
// A remove function which makes sure the entity hasn't already
|
||||
// been removed, and that it isn't the world object.
|
||||
// been removed, and that it isn't the NIL object.
|
||||
void(entity te) dremove =
|
||||
{
|
||||
if (te == world)
|
||||
if (!te)
|
||||
{
|
||||
RPrint("***BUG BUG BUG BUG BUG BUG BUG BUG BUG BUG***\n");
|
||||
RPrint("WORLD has nearly been removed. Don't worry!\n");
|
||||
|
@ -68,7 +68,7 @@ void (string msg) RPrint =
|
|||
{
|
||||
dprint(msg);
|
||||
|
||||
if (debug_target==world)
|
||||
if (!debug_target)
|
||||
return;
|
||||
|
||||
sprint(debug_target,PRINT_HIGH,msg);
|
||||
|
@ -98,7 +98,7 @@ void(entity who) MakeMeDebug =
|
|||
RPrint(who.netname);
|
||||
RPrint(" requests remote debugging. Debug (dprints) messages will be sent to him/her too.\n");
|
||||
|
||||
if (debug_target!=world)
|
||||
if (debug_target)
|
||||
{
|
||||
sprint(debug_target,PRINT_HIGH,"(OfteN debug): You are not the remote debugger anymore.\n");
|
||||
sprint(debug_target,PRINT_HIGH," New remote debugger is: '");
|
||||
|
|
6
defs.qc
6
defs.qc
|
@ -242,7 +242,7 @@ float deathmatch;
|
|||
//================================================
|
||||
|
||||
//
|
||||
// world fields (FIXME: make globals)
|
||||
// NIL fields (FIXME: make globals)
|
||||
//
|
||||
.string wad;
|
||||
.string map;
|
||||
|
@ -449,7 +449,7 @@ void(entity e) remove = #15;
|
|||
// nomonsters can be:
|
||||
// An entity will also be ignored for testing if forent == test,
|
||||
// forent->owner == test, or test->owner == forent
|
||||
// a forent of world is ignored
|
||||
// a forent of NIL is ignored
|
||||
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
|
||||
|
||||
entity() checkclient = #17; // returns a client to look for
|
||||
|
@ -552,7 +552,7 @@ void(entity e) setspawnparms = #78; // set parm1... to the
|
|||
// for coop respawn
|
||||
|
||||
void(entity killer, entity killee) logfrag = #79; // add to stats
|
||||
string(entity e, string key) infokey = #80; // get a key value (world = serverinfo)
|
||||
string(entity e, string key) infokey = #80; // get a key value (NIL = serverinfo)
|
||||
void(vector where, float set) multicast = #82; // sends the temp message
|
||||
// to a set of clients,
|
||||
// possibly in PVS or PHS
|
||||
|
|
16
demoman.qc
16
demoman.qc
|
@ -34,8 +34,8 @@ void() TeamFortress_DetonatePipebombs =
|
|||
local entity e;
|
||||
|
||||
// Find all this players pipebombs
|
||||
e = find(world, classname, "pipebomb");
|
||||
while (e != world)
|
||||
e = find(NIL, classname, "pipebomb");
|
||||
while (e)
|
||||
{
|
||||
if(e.owner == self)
|
||||
e.nextthink = time;
|
||||
|
@ -71,7 +71,7 @@ void() MirvGrenadeExplode =
|
|||
local float i;
|
||||
|
||||
deathmsg = DMSG_GREN_MIRV;
|
||||
T_RadiusDamage (self, self.owner, 100, world);
|
||||
T_RadiusDamage (self, self.owner, 100, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
@ -155,7 +155,7 @@ void(float timer) TeamFortress_SetDetpack =
|
|||
if (self.ammo_detpack <= 0)
|
||||
return;
|
||||
|
||||
if (infokey (world, "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,11 +228,11 @@ void(float krac) TeamFortress_DetpackStop =
|
|||
{
|
||||
local entity detpack_timer;
|
||||
|
||||
detpack_timer = find(world, netname, "detpack_timer");
|
||||
while ((detpack_timer.owner != self) && (detpack_timer != world))
|
||||
detpack_timer = find(NIL, netname, "detpack_timer");
|
||||
while ((detpack_timer.owner != self) && (detpack_timer))
|
||||
detpack_timer = find(detpack_timer, netname, "detpack_timer");
|
||||
|
||||
if (detpack_timer == world)
|
||||
if (!detpack_timer)
|
||||
return;
|
||||
|
||||
if (krac == TRUE) {
|
||||
|
@ -347,7 +347,7 @@ void() TeamFortress_DetpackExplode =
|
|||
if (pos != CONTENTS_SOLID && pos != CONTENTS_SKY)
|
||||
{
|
||||
deathmsg = DMSG_DETPACK;
|
||||
T_RadiusDamage (self, self.owner, WEAP_DETPACK_SIZE, world);
|
||||
T_RadiusDamage (self, self.owner, WEAP_DETPACK_SIZE, NIL);
|
||||
|
||||
sound(self, CHAN_MISC, "weapons/detpack.wav", 1, ATTN_NONE);
|
||||
|
||||
|
|
2
demon.qc
2
demon.qc
|
@ -713,7 +713,7 @@ void () custom_demon_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your fiend is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
}
|
||||
|
||||
if (self.health < -38)
|
||||
|
|
4
doors.qc
4
doors.qc
|
@ -130,7 +130,7 @@ void() door_fire =
|
|||
{
|
||||
door_go_down ();
|
||||
self = self.enemy;
|
||||
} while ( (self != starte) && (self != world) );
|
||||
} while ( (self != starte) && (self) );
|
||||
self = oself;
|
||||
return;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ void() door_fire =
|
|||
{
|
||||
door_go_up ();
|
||||
self = self.enemy;
|
||||
} while ( (self != starte) && (self != world) );
|
||||
} while ( (self != starte) && (self) );
|
||||
self = oself;
|
||||
};
|
||||
|
||||
|
|
28
engineer.qc
28
engineer.qc
|
@ -72,7 +72,7 @@ void() LaserBolt_Touch =
|
|||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
if (other == self.enemy && self.enemy != world)
|
||||
if (other == self.enemy && self.enemy)
|
||||
return; // don't explode on same person twice
|
||||
|
||||
if (pointcontents(self.origin) == CONTENTS_SKY)
|
||||
|
@ -189,7 +189,7 @@ void() EMPExplode =
|
|||
}
|
||||
|
||||
deathmsg = DMSG_GREN_EMP_AMMO;
|
||||
T_RadiusDamage (self, self.enemy, expsize, world);
|
||||
T_RadiusDamage (self, self.enemy, expsize, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
@ -445,13 +445,13 @@ void() TeamFortress_EngineerBuild =
|
|||
TeamFortress_SetSpeed(self);
|
||||
|
||||
// Remove the timer
|
||||
te = find(world, netname, "build_timer");
|
||||
te = find(NIL, netname, "build_timer");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self)
|
||||
{
|
||||
dremove(te);
|
||||
te = world;
|
||||
te = NIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ void() TeamFortress_FinishedBuilding =
|
|||
|
||||
oldself = self;
|
||||
self = self.owner;
|
||||
oldself.owner = world;
|
||||
oldself.owner = NIL;
|
||||
oldself.real_owner = self;
|
||||
|
||||
self.is_building = 0;
|
||||
|
@ -854,7 +854,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 = world;
|
||||
oldself.owner = NIL;
|
||||
|
||||
// Put some ammo in the Dispenser
|
||||
oldself.ammo_shells = ceil(self.ammo_shells * 0.25);
|
||||
|
@ -985,8 +985,8 @@ void() TeamFortress_FinishedBuilding =
|
|||
oldself.no_grenades_2 = 0; // cloak touch delay reset
|
||||
|
||||
oldself.touch = Tesla_Touch;
|
||||
oldself.enemy = world;
|
||||
oldself.oldenemy = world; //CH for sbar
|
||||
oldself.enemy = NIL;
|
||||
oldself.oldenemy = NIL; //CH for sbar
|
||||
|
||||
//Set all initial tesla values here
|
||||
oldself.maxammo_shells = 0; //Voltage == 0
|
||||
|
@ -1056,7 +1056,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 = world;
|
||||
oldself.owner = NIL;
|
||||
oldself.movetype = MOVETYPE_TOSS;
|
||||
|
||||
oldself.solid = SOLID_BBOX;
|
||||
|
@ -1101,7 +1101,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 = world;
|
||||
oldself.owner = NIL;
|
||||
oldself.movetype = MOVETYPE_TOSS;
|
||||
|
||||
oldself.solid = SOLID_BBOX;
|
||||
|
@ -1136,7 +1136,7 @@ void() T_Dispenser =
|
|||
TF_T_Damage(self, self, self, 200, 0, TF_TD_OTHER);
|
||||
|
||||
// Ignore any engineer working on this dispenser
|
||||
if (other.building == world && other.building_wait < time)
|
||||
if (!other.building && other.building_wait < time)
|
||||
{
|
||||
// Pop up the menu
|
||||
other.current_menu = MENU_DISPENSER;
|
||||
|
@ -1160,7 +1160,7 @@ void() T_Dispenser =
|
|||
|
||||
void() Dispenser_Explode =
|
||||
{
|
||||
T_RadiusDamage(self.demon_one, self.demon_one, self.has_holo, world);
|
||||
T_RadiusDamage(self.demon_one, self.demon_one, self.has_holo, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
@ -1189,7 +1189,7 @@ void() Dispenser_Die =
|
|||
newmis.demon_one = self;
|
||||
newmis.nextthink = time + 0.1;
|
||||
newmis.think = Dispenser_Explode;
|
||||
/*T_RadiusDamage(self, self, damg, world); // 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");
|
||||
|
@ -1546,7 +1546,7 @@ void() CheckDistance =
|
|||
CenterPrint(self.owner, "\n");
|
||||
self.owner.menu_count = MENU_REFRESH_RATE;
|
||||
self.owner.current_menu = MENU_DEFAULT;
|
||||
self.owner.building = world;
|
||||
self.owner.building = NIL;
|
||||
dremove(self);
|
||||
return;
|
||||
}
|
||||
|
|
58
field.qc
58
field.qc
|
@ -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 'world'
|
||||
.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 = world;
|
||||
self.demon_one.fieldgen_field = NIL;
|
||||
}
|
||||
|
||||
if (IsValidFieldGen(self.demon_two))
|
||||
{
|
||||
self.demon_two.fieldgen_hasfield = FALSE;
|
||||
self.demon_two.fieldgen_field = world;
|
||||
self.demon_two.fieldgen_field = NIL;
|
||||
}
|
||||
|
||||
self.demon_one = world;
|
||||
self.demon_two = world;
|
||||
self.demon_one = NIL;
|
||||
self.demon_two = NIL;
|
||||
|
||||
dremove(self);
|
||||
|
||||
|
@ -346,11 +346,11 @@ entity(entity myself) GetMyFieldGen =
|
|||
{
|
||||
local entity te;
|
||||
local float foundit;
|
||||
te = world;
|
||||
te = NIL;
|
||||
foundit = FALSE;
|
||||
|
||||
te = find(world, classname, "building_fieldgen");
|
||||
while (te != world && foundit == FALSE)
|
||||
te = find(NIL, classname, "building_fieldgen");
|
||||
while (te && foundit == FALSE)
|
||||
{
|
||||
if (te.real_owner == myself) // is it ours?
|
||||
foundit = TRUE; // yeah, found it
|
||||
|
@ -504,7 +504,7 @@ void(entity tfield, vector where, entity thing) FieldExplosion =
|
|||
{
|
||||
if (!tfield.has_camera)
|
||||
{
|
||||
if (thing == world || thing.is_removed) return;
|
||||
if (!thing || thing.is_removed) return;
|
||||
|
||||
local vector whereFX;
|
||||
whereFX = where;
|
||||
|
@ -555,7 +555,7 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
eprint(gen2.fieldgen_field);
|
||||
dprint("done\n"); */
|
||||
|
||||
if (gen1.fieldgen_field != world || gen2.fieldgen_field != world) // CHECK
|
||||
if (gen1.fieldgen_field || gen2.fieldgen_field) // CHECK
|
||||
return;
|
||||
|
||||
// already checked b4 on CanLink -> CanIdle
|
||||
|
@ -573,7 +573,7 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
// generate field
|
||||
tfield = spawn();
|
||||
tfield.classname = "force_field";
|
||||
tfield.owner = world;
|
||||
tfield.owner = NIL;
|
||||
tfield.real_owner = gen1.real_owner; // --> player
|
||||
|
||||
tfield.think = Field_think;
|
||||
|
@ -644,7 +644,7 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
else if (gen1.martyr_enemy)
|
||||
tfield.martyr_enemy = gen2.martyr_enemy;
|
||||
else
|
||||
tfield.martyr_enemy = world;
|
||||
tfield.martyr_enemy = NIL;
|
||||
|
||||
/* // make sure the field goes off instantly if there's somebody in it
|
||||
local entity oldself;
|
||||
|
@ -667,11 +667,11 @@ void(entity gen1, entity gen2) Remove_Field =
|
|||
dremove(gen1.fieldgen_field);
|
||||
}
|
||||
gen1.fieldgen_hasfield = FALSE;
|
||||
gen1.fieldgen_field = world;
|
||||
gen1.fieldgen_field = NIL;
|
||||
if (IsValidFieldGen(gen2))
|
||||
{
|
||||
gen2.fieldgen_hasfield = FALSE;
|
||||
gen2.fieldgen_field = world;
|
||||
gen2.fieldgen_field = NIL;
|
||||
}
|
||||
}
|
||||
else if (IsValidFieldGen(gen2))
|
||||
|
@ -682,13 +682,13 @@ void(entity gen1, entity gen2) Remove_Field =
|
|||
dremove(gen2.fieldgen_field);
|
||||
}
|
||||
gen2.fieldgen_hasfield = FALSE;
|
||||
gen2.fieldgen_field = world;
|
||||
gen2.fieldgen_field = NIL;
|
||||
}
|
||||
};
|
||||
|
||||
float(entity field) IsValidField =
|
||||
{
|
||||
if (field == world)
|
||||
if (!field)
|
||||
return FALSE;
|
||||
|
||||
if (field.classname != "force_field")
|
||||
|
@ -699,7 +699,7 @@ float(entity field) IsValidField =
|
|||
|
||||
float(entity field) IsValidFieldGen =
|
||||
{
|
||||
if (field == world)
|
||||
if (!field)
|
||||
return FALSE;
|
||||
|
||||
if (field.classname != "building_fieldgen")
|
||||
|
@ -983,8 +983,8 @@ void(entity field) Field_Built =
|
|||
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 = world;
|
||||
field.martyr_enemy = world;
|
||||
field.fieldgen_field = NIL;
|
||||
field.martyr_enemy = NIL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
|
@ -994,11 +994,11 @@ entity(entity fieldgen) Find_OtherGen =
|
|||
{
|
||||
local entity te;
|
||||
local float foundit;
|
||||
te = world;
|
||||
te = NIL;
|
||||
foundit = FALSE;
|
||||
|
||||
te = find(world, classname, "building_fieldgen");
|
||||
while (te != world && foundit == FALSE)
|
||||
te = find(NIL, classname, "building_fieldgen");
|
||||
while (te && foundit == FALSE)
|
||||
{
|
||||
if (te.real_owner == fieldgen.real_owner) // is it ours?
|
||||
if (te != fieldgen) // and not the same generator..
|
||||
|
@ -1023,7 +1023,7 @@ void (vector place) WhereGen =
|
|||
return;
|
||||
|
||||
local float r, foundit;
|
||||
local entity te = world;
|
||||
local entity te = NIL;
|
||||
|
||||
foundit = FALSE;
|
||||
|
||||
|
@ -1032,10 +1032,10 @@ void (vector place) WhereGen =
|
|||
te = find (te, classname, "building_fieldgen");
|
||||
if (te.real_owner == self)
|
||||
foundit = TRUE;
|
||||
} while (te != world && foundit == FALSE);
|
||||
} while (te && foundit == FALSE);
|
||||
/*
|
||||
te = find (world, classname, "building_fieldgen");
|
||||
while (te != world && foundit == FALSE)
|
||||
te = find (NIL, classname, "building_fieldgen");
|
||||
while (te && foundit == FALSE)
|
||||
{
|
||||
if (te.real_owner == self) // is it ours?
|
||||
foundit = TRUE; // yeah, found it
|
||||
|
@ -1045,7 +1045,7 @@ void (vector place) WhereGen =
|
|||
}*/
|
||||
|
||||
// check for error getting the other gen
|
||||
if (te == world || te.classname != "building_fieldgen" || foundit == FALSE)
|
||||
if (!te || te.classname != "building_fieldgen" || foundit == FALSE)
|
||||
{
|
||||
RPrint("BUG: Error on field generator placement routine. 'WhereGen()'\n");
|
||||
return;
|
||||
|
@ -1098,7 +1098,7 @@ void() FieldGen_Die =
|
|||
}
|
||||
else
|
||||
{
|
||||
Remove_Field(self, world); // 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");
|
||||
|
@ -1122,7 +1122,7 @@ void(entity field) Engineer_UseFieldGen =
|
|||
sprint(self,PRINT_HIGH,"Trapped field generator, have a nice day!\n");
|
||||
|
||||
deathmsg = DMSG_FGTRAP;
|
||||
T_RadiusDamage (self.building, self.building, FGTRAP_DMG, world);
|
||||
T_RadiusDamage (self.building, self.building, FGTRAP_DMG, NIL);
|
||||
// TF_T_Damage(self.building, self.building, self.building, 2000, 0, TF_TD_OTHER);
|
||||
return;
|
||||
//}
|
||||
|
|
122
grunty.qc
122
grunty.qc
|
@ -184,7 +184,7 @@ void() grunty_stand = // We need two stand sections for axe and weapon
|
|||
|
||||
Grunty_Check_Frags();
|
||||
|
||||
if (self.goalentity != world)
|
||||
if (self.goalentity)
|
||||
{
|
||||
self.walkframe = 0;
|
||||
self.think = grunty_run;
|
||||
|
@ -235,7 +235,7 @@ void() grunty_run =
|
|||
}
|
||||
#endif
|
||||
|
||||
if (self.goalentity == world)
|
||||
if (!self.goalentity)
|
||||
{
|
||||
self.walkframe = 0;
|
||||
self.think = grunty_stand;
|
||||
|
@ -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 = world;
|
||||
self.goalentity = NIL;
|
||||
|
||||
|
||||
// Check to buy
|
||||
|
@ -587,7 +587,7 @@ void() GruntyThink =
|
|||
// LookAround for grunty
|
||||
entity (entity scanner) LookAroundGrunty =
|
||||
{
|
||||
if (infokey(world,"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 = world;
|
||||
local entity retarg = NIL;
|
||||
local float r;
|
||||
r = random();
|
||||
|
||||
|
@ -677,21 +677,21 @@ entity () GruntyPharse =
|
|||
void() GruntyScanTargets =
|
||||
{
|
||||
local entity targ; // our hapless foe
|
||||
targ = world;
|
||||
targ = NIL;
|
||||
|
||||
if (self.enemy != world)
|
||||
if (self.enemy)
|
||||
if (self.enemy.health <= 0 || self.enemy.has_disconnected)
|
||||
{
|
||||
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
self.goalentity = ReturnEasyWaypoint(self,self);
|
||||
|
||||
//// self.enemy = world;
|
||||
//// self.goalentity = world;
|
||||
if (self.demon_one != world)
|
||||
//// self.enemy = NIL;
|
||||
//// self.goalentity = NIL;
|
||||
if (self.demon_one)
|
||||
{
|
||||
RemoveWaypoint(self.demon_one,self);
|
||||
self.demon_one = world;
|
||||
self.demon_one = NIL;
|
||||
}
|
||||
|
||||
self.has_teleporter = 0;
|
||||
|
@ -699,16 +699,16 @@ void() GruntyScanTargets =
|
|||
return;
|
||||
}
|
||||
// If we have a target already
|
||||
if (self.enemy != world)
|
||||
if (self.enemy)
|
||||
{
|
||||
local float vis;
|
||||
vis = visible(self.enemy);
|
||||
if (vis)
|
||||
{
|
||||
if (self.demon_one != world)
|
||||
if (self.demon_one)
|
||||
{
|
||||
RemoveWaypoint(self.demon_one,self);
|
||||
self.demon_one=world;
|
||||
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 = world;
|
||||
self.enemy = NIL;
|
||||
self.goalentity = ReturnEasyWaypoint(self,self);
|
||||
|
||||
self.has_teleporter = 0;
|
||||
|
@ -729,9 +729,9 @@ void() GruntyScanTargets =
|
|||
}
|
||||
// tactic
|
||||
|
||||
if (self.demon_one == world) // if we don't have a enemy last seen marker
|
||||
if (!self.demon_one) // if we don't have a enemy last seen marker
|
||||
{
|
||||
if (self.demon_one!=world)
|
||||
if (self.demon_one)
|
||||
{
|
||||
RemoveWaypoint(self.demon_one,self);
|
||||
}
|
||||
|
@ -745,13 +745,13 @@ void() GruntyScanTargets =
|
|||
}
|
||||
if (self.search_time <= time) // we seeked enemy for GRUNTY_SEEKTIME already so...
|
||||
{
|
||||
self.enemy = world;
|
||||
self.goalentity = world;
|
||||
self.enemy = NIL;
|
||||
self.goalentity = NIL;
|
||||
|
||||
if (self.demon_one != world) // d1 remove contingency check
|
||||
if (self.demon_one) // d1 remove contingency check
|
||||
{
|
||||
RemoveWaypoint(self.demon_one,self);
|
||||
self.demon_one = world;
|
||||
self.demon_one = NIL;
|
||||
self.goalentity = ReturnEasyWaypoint(self,self);
|
||||
}
|
||||
}
|
||||
|
@ -764,10 +764,10 @@ void() GruntyScanTargets =
|
|||
|
||||
if (targ == self)
|
||||
return;
|
||||
if (targ == world)
|
||||
if (!targ)
|
||||
return;
|
||||
|
||||
if (!self.is_detpacking || infokey(world,"ceasefire")=="on")
|
||||
if (!self.is_detpacking || infokey(NIL,"ceasefire")=="on")
|
||||
{
|
||||
if (!IsBuilding(targ) && self.super_time < time && targ.netname != "land_mine")
|
||||
{
|
||||
|
@ -804,13 +804,13 @@ void() GruntyCheckFire =
|
|||
if (self.attack_finished > time)
|
||||
return;
|
||||
|
||||
if (self.enemy == world)
|
||||
if (!self.enemy)
|
||||
return;
|
||||
|
||||
if (infokey(world,"ceasefire")=="on")
|
||||
if (infokey(NIL,"ceasefire")=="on")
|
||||
{
|
||||
self.goalentity=ReturnEasyWaypoint(self,self);
|
||||
self.enemy=world;
|
||||
self.enemy=NIL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -978,7 +978,7 @@ void() GRun =
|
|||
// ok, we're trying to get somewhere
|
||||
// first look at where we are trying to go
|
||||
// Version 1.0 of GruntyLead(tm)
|
||||
if (self.enemy != world)
|
||||
if (self.enemy)
|
||||
{
|
||||
local vector pvel;
|
||||
|
||||
|
@ -999,7 +999,7 @@ void() GRun =
|
|||
}
|
||||
else
|
||||
{
|
||||
if (self.goalentity!=world) //- OfN - dont change yaw if we r not after a goal
|
||||
if (self.goalentity) //- OfN - dont change yaw if we r not after a goal
|
||||
{
|
||||
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
|
||||
self.ideal_yaw = anglemod(self.ideal_yaw);
|
||||
|
@ -1052,14 +1052,14 @@ void() GRun =
|
|||
else if (self.has_teleporter == 0) // no evasive, standard move (forward)
|
||||
{
|
||||
//- OfN - force move to forward if we r going to a last seen enemy waypoint
|
||||
if (self.goalentity == self.demon_one && self.demon_one!=world)
|
||||
if (self.goalentity == self.demon_one && self.demon_one)
|
||||
{
|
||||
self.has_teleporter = 0;
|
||||
botmovedist(vectoyaw(v_forward), dist); // move
|
||||
}
|
||||
else
|
||||
{
|
||||
if (self.is_malfunctioning == 2 && self.enemy != world) {
|
||||
if (self.is_malfunctioning == 2 && self.enemy) {
|
||||
local float dist = vlen (self.origin - self.enemy.origin);
|
||||
local float desired_min, desired_max;
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ void() GRun =
|
|||
} else
|
||||
botmovedist(vectoyaw(v_forward), dist); // move
|
||||
|
||||
if (random() < 0.05 && self.enemy != world) // if we get a score
|
||||
if (random() < 0.05 && self.enemy) // if we get a score
|
||||
{ // of one on a d20,
|
||||
local float r; // special
|
||||
r = random();
|
||||
|
@ -1342,15 +1342,15 @@ void() custom_grunt_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your soldier is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
|
||||
if (self.martyr_enemy != world)
|
||||
if (self.martyr_enemy)
|
||||
RemoveWaypoint(self.martyr_enemy, self);
|
||||
|
||||
if (self.demon_one != world)
|
||||
if (self.demon_one)
|
||||
RemoveWaypoint(self.demon_one, self);
|
||||
|
||||
if (self.demon_two != world)
|
||||
if (self.demon_two)
|
||||
RemoveWaypoint(self.demon_two, self);
|
||||
|
||||
local entity oself;
|
||||
|
@ -1498,7 +1498,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 = world;
|
||||
self.owner.demon_one.demon_one = NIL;
|
||||
|
||||
dremove(self);
|
||||
return;
|
||||
|
@ -1534,7 +1534,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 world 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 +1542,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 = world;
|
||||
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 = world;
|
||||
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 = world;
|
||||
self.owner.demon_one.demon_one = NIL;
|
||||
|
||||
dremove(self);
|
||||
return;
|
||||
|
@ -1966,7 +1966,7 @@ void() grunty_touch =
|
|||
return;
|
||||
}*/
|
||||
|
||||
if (other.classname=="player" && self.has_holo < time && self.enemy == world && self.health >= 0)
|
||||
if (other.classname=="player" && self.has_holo < time && !self.enemy && self.health >= 0)
|
||||
{
|
||||
local string st;
|
||||
|
||||
|
@ -2012,31 +2012,31 @@ void() grunty_touch =
|
|||
|
||||
void(entity wyp, entity soldier) RemoveWaypoint =
|
||||
{
|
||||
if (wyp==world) return;
|
||||
if (!wyp) return;
|
||||
|
||||
if (wyp.classname == "grunty_waypoint" && wyp.owner == soldier.real_owner)
|
||||
{
|
||||
if (wyp.owner.demon_one.martyr_enemy != world)
|
||||
if (wyp.owner.demon_one.martyr_enemy)
|
||||
{
|
||||
if (wyp.owner.demon_one.martyr_enemy.goalentity == wyp)
|
||||
wyp.owner.demon_one.martyr_enemy.goalentity = world;
|
||||
wyp.owner.demon_one.martyr_enemy.goalentity = NIL;
|
||||
}
|
||||
|
||||
if (wyp.owner.demon_one.demon_two != world)
|
||||
if (wyp.owner.demon_one.demon_two)
|
||||
{
|
||||
if (wyp.owner.demon_one.demon_two.goalentity == wyp)
|
||||
wyp.owner.demon_one.demon_two.goalentity = world;
|
||||
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 = world;
|
||||
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 = world;
|
||||
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 = world;
|
||||
wyp.owner.demon_one.demon_one = NIL;
|
||||
|
||||
dremove(wyp);
|
||||
}
|
||||
|
@ -2047,15 +2047,15 @@ void(entity wyp, entity soldier) RemoveWaypoint =
|
|||
|
||||
entity(entity sold, entity viewpoint) ReturnEasyWaypoint =
|
||||
{
|
||||
if (sold.penance_time==2) return world;
|
||||
if (sold.penance_time==0) return world;
|
||||
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 world;
|
||||
return NIL;
|
||||
}
|
||||
|
||||
if (visible2(sold,sold.real_owner))
|
||||
|
@ -2064,23 +2064,23 @@ 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 world;
|
||||
return NIL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sold.martyr_enemy!=world && sold.job==1 && visible2(viewpoint,sold.martyr_enemy))
|
||||
if (sold.martyr_enemy && sold.job==1 && visible2(viewpoint,sold.martyr_enemy))
|
||||
return sold.martyr_enemy;
|
||||
|
||||
if (sold.demon_two!=world && sold.job==2 && visible2(viewpoint,sold.demon_two))
|
||||
if (sold.demon_two && sold.job==2 && visible2(viewpoint,sold.demon_two))
|
||||
return sold.demon_two;
|
||||
|
||||
// no last waypoint walk so lets see whats easier to reach...
|
||||
|
||||
local entity retENT;
|
||||
retENT=world;
|
||||
retENT=NIL;
|
||||
|
||||
if (sold.demon_two!=world && sold.martyr_enemy!=world) // both waypoints assigned? ok...
|
||||
if (sold.demon_two && sold.martyr_enemy) // both waypoints assigned? ok...
|
||||
{
|
||||
if (visible2(viewpoint,sold.martyr_enemy) && visible2(viewpoint,sold.demon_two)) // both waypoints visible? lets see which one is closest...
|
||||
{
|
||||
|
@ -2102,18 +2102,18 @@ entity(entity sold, entity viewpoint) ReturnEasyWaypoint =
|
|||
else if (visible2(viewpoint,sold.demon_two)) // only secondary wayp is visible?
|
||||
retENT=sold.demon_two;
|
||||
}
|
||||
else if (sold.demon_two!=world) // only secondary wayp is assigned?
|
||||
else if (sold.demon_two) // only secondary wayp is assigned?
|
||||
{
|
||||
if (visible2(viewpoint,sold.demon_two))
|
||||
retENT=sold.demon_two;
|
||||
}
|
||||
else if (sold.martyr_enemy!=world) // only primary wayp is assigned?
|
||||
else if (sold.martyr_enemy) // only primary wayp is assigned?
|
||||
{
|
||||
if (visible2(viewpoint,sold.martyr_enemy))
|
||||
retENT=sold.martyr_enemy;
|
||||
}
|
||||
|
||||
if (sold.penance_time == 3 && retENT==world)
|
||||
if (sold.penance_time == 3 && !retENT)
|
||||
{
|
||||
PrintFromSoldier(sold,sold.real_owner,"can't see my waypoints around here!\n");
|
||||
//sold.penance_time = 0; // don't reset sold last "intention"
|
||||
|
|
24
haxxx.qc
24
haxxx.qc
|
@ -17,7 +17,7 @@ void(entity ignore, string st, string st2, string st3, string st4, string st5, s
|
|||
|
||||
void () Menu_Friend_Hax =
|
||||
{
|
||||
if (self.demon_two == world) // safety
|
||||
if (!self.demon_two) // safety
|
||||
{
|
||||
sprint(self,PRINT_HIGH,"You have lost the connection!\n");
|
||||
ResetMenu();
|
||||
|
@ -139,13 +139,13 @@ void () Menu_Friend_Hax =
|
|||
|
||||
void(float inp) Menu_FriendHax_Inp =
|
||||
{
|
||||
if (self.classname != "player" || self.demon_two == world)
|
||||
if (self.classname != "player" || !self.demon_two)
|
||||
return;
|
||||
|
||||
if (inp == 10)
|
||||
{
|
||||
self.impulse=0;
|
||||
self.demon_two=world;
|
||||
self.demon_two=NIL;
|
||||
ResetMenu();
|
||||
return;
|
||||
}
|
||||
|
@ -188,13 +188,13 @@ void(float inp) Menu_FriendHax_Inp =
|
|||
|
||||
void(float inp) Menu_EnemyHax_Inp =
|
||||
{
|
||||
if (self.classname != "player" || self.demon_two == world)
|
||||
if (self.classname != "player" || !self.demon_two)
|
||||
return;
|
||||
|
||||
if (inp == 10)
|
||||
{
|
||||
self.impulse=0;
|
||||
self.demon_two=world;
|
||||
self.demon_two=NIL;
|
||||
ResetMenu();
|
||||
return;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ void(float inp) Menu_EnemyHax_Inp =
|
|||
|
||||
void () Menu_Enemy_Hax =
|
||||
{
|
||||
if (self.demon_two == world) // safety
|
||||
if (!self.demon_two) // safety
|
||||
{
|
||||
sprint(self,PRINT_HIGH,"You have lost the connection!\n");
|
||||
ResetMenu();
|
||||
|
@ -843,7 +843,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=world;
|
||||
self.demon_two=NIL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ float() CheckHaxxx =
|
|||
local float retval;
|
||||
retval = TRUE;
|
||||
|
||||
if (self.martyr_enemy == world) // BUG!
|
||||
if (!self.martyr_enemy) // BUG!
|
||||
retval = FALSE;
|
||||
else if (!(IsBuilding(self.martyr_enemy))) // BUG! 2
|
||||
retval = FALSE;
|
||||
|
@ -1277,7 +1277,7 @@ void() JobHacker =
|
|||
{
|
||||
sprint(self, PRINT_HIGH, "You can't hack him.\n");
|
||||
ResetMenu();
|
||||
self.demon_two=world;
|
||||
self.demon_two=NIL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ void(entity thebuilding) UpdateBuildingMenus =
|
|||
local entity te;
|
||||
|
||||
// find all players
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.job & JOB_HACKER) // a hacker?
|
||||
|
@ -1333,7 +1333,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 = world;
|
||||
te.demon_two = NIL;
|
||||
if (te.StatusBarSize == 0)
|
||||
CenterPrint(te, "\n");
|
||||
else
|
||||
|
@ -1343,7 +1343,7 @@ void(entity thebuilding) UpdateBuildingMenus =
|
|||
}
|
||||
|
||||
if (te.building == thebuilding) // put the eng building to wolrd, and player_menu will reset it
|
||||
te.building = world;
|
||||
te.building = NIL;
|
||||
|
||||
te = find(te, classname, "player");
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ void() hknight_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your hell knight is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
}
|
||||
|
||||
// check for gib
|
||||
|
|
24
jobs.qc
24
jobs.qc
|
@ -278,7 +278,7 @@ void() ChaplanInspire = {
|
|||
//entity(entity start, .string fld, string match) find = #18;
|
||||
void() ChaplanGuides = {
|
||||
local entity head;
|
||||
head = find(world,classname,"player");
|
||||
head = find(NIL,classname,"player");
|
||||
while (head) {
|
||||
if (head.inspirator == self) {
|
||||
// Create the Lightning
|
||||
|
@ -292,7 +292,7 @@ void() ChaplanGuides = {
|
|||
WriteCoord (MSG_ONE, head.origin_x);
|
||||
WriteCoord (MSG_ONE, head.origin_y);
|
||||
WriteCoord (MSG_ONE, head.origin_z + 8);
|
||||
head = world;
|
||||
head = NIL;
|
||||
}
|
||||
else //We can only draw one lightning. :p
|
||||
head = find(head,classname,"player");
|
||||
|
@ -505,8 +505,8 @@ void() JudokaRearm =
|
|||
////Fix feign while stolen
|
||||
self.enemy.weapon = 0;
|
||||
////Fix reloading
|
||||
te = find(world, netname, "reloadtimer");
|
||||
while (te != world)
|
||||
te = find(NIL, netname, "reloadtimer");
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "timer" && te.owner == self.enemy) {
|
||||
oself = self;
|
||||
|
@ -600,8 +600,8 @@ void() JobJudoka =
|
|||
trace_ent.current_weapon = WEAP_SNIPER_RIFLE;
|
||||
|
||||
//If already reloading, remove that timer
|
||||
te = find(world, netname, "reloadtimer");
|
||||
while (te != world)
|
||||
te = find(NIL, netname, "reloadtimer");
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "timer" && te.owner == trace_ent) {
|
||||
oself = self;
|
||||
|
@ -723,9 +723,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, 80, world); //- damage was 80
|
||||
T_RadiusDamage (self, self.owner, 80, NIL); //- damage was 80
|
||||
else
|
||||
T_RadiusDamage (self, self.owner, MINE_DMG, world); //- 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;
|
||||
|
@ -749,9 +749,9 @@ void(entity mine_owner) DetonateMines =
|
|||
local entity e;
|
||||
|
||||
// Find any mine
|
||||
e = find(world, netname, "land_mine");
|
||||
e = find(NIL, netname, "land_mine");
|
||||
|
||||
while (e != world)
|
||||
while (e)
|
||||
{
|
||||
if(e.owner == mine_owner) {
|
||||
e.heat = time;
|
||||
|
@ -819,7 +819,7 @@ void() GuerillaThink = //Every second see if we have enemy nearby
|
|||
return;
|
||||
}
|
||||
head = findradius(self.origin,GUERILLA_RADIUS);//OfN it was 150
|
||||
while (head != world && !finished) {
|
||||
while (head && !finished) {
|
||||
if (head.classname == "player") {
|
||||
//Mines detonate on either enemies or yourself
|
||||
if (CanDamage(head,self)) {
|
||||
|
@ -859,7 +859,7 @@ void() GuerillaTouch = //What happens when someone runs it over
|
|||
|
||||
void() GuerillaTossTouch =
|
||||
{
|
||||
if (other != world) {
|
||||
if (other) {
|
||||
GuerillaTouch();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ void() knight_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your knight is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
}
|
||||
|
||||
self.has_holo = 0; // we r dead, mark us
|
||||
|
|
2
makefile
2
makefile
|
@ -1,5 +1,5 @@
|
|||
all: qwprogs.dat
|
||||
qwprogs.dat: progs.src *.qc *.qh
|
||||
qfcc --warn=error --code=debug --quiet
|
||||
qfcc --warn=error --code=debug
|
||||
clean:
|
||||
rm -f core *.dat *.pqc *.sym progdefs.h
|
||||
|
|
22
medic.qc
22
medic.qc
|
@ -125,13 +125,13 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
|
|||
|
||||
// remove concussion from player
|
||||
// Try to find a concusstimer entity for this player
|
||||
te = find(world, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != ConcussionGrenadeTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != ConcussionGrenadeTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
SpawnBlood(org, 20);
|
||||
patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_CONCUSSIONED);
|
||||
|
@ -158,13 +158,13 @@ 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(world, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != HallucinationTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != HallucinationTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_HALLUCINATING);
|
||||
SpawnBlood(org, 20);
|
||||
|
@ -196,12 +196,12 @@ 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(world, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != TranquiliserTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != patient) || (te.think != TranquiliserTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_TRANQUILISED);
|
||||
TeamFortress_SetSpeed(patient);
|
||||
|
@ -259,9 +259,9 @@ float(entity doc, entity patient, vector org) CureAdverseEffects =
|
|||
// remove the infection
|
||||
patient.tfstate = patient.tfstate - (patient.tfstate & TFSTATE_INFECTED);
|
||||
|
||||
te = find(world, netname, "biotimer");
|
||||
te = find(NIL, netname, "biotimer");
|
||||
|
||||
while (te != world)
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "timer")
|
||||
if (te.owner == patient)
|
||||
|
|
62
menu.qc
62
menu.qc
|
@ -218,7 +218,7 @@ void() Player_Menu =
|
|||
self.StatusRefreshTime = time + 1.5;
|
||||
|
||||
//- OfN - Checks for destroyed buildings - NEEDED?
|
||||
/*if (self.current_menu >= MENU_ENGINEER_FIX_DISPENSER && self.current_menu <= MENU_ENGINEER_FIX_FIELDGEN && self.building == world)
|
||||
/*if (self.current_menu >= MENU_ENGINEER_FIX_DISPENSER && self.current_menu <= MENU_ENGINEER_FIX_FIELDGEN && !self.building)
|
||||
{
|
||||
ResetMenu();
|
||||
return;
|
||||
|
@ -525,7 +525,7 @@ void() Menu_Class =
|
|||
{
|
||||
local entity AD;
|
||||
|
||||
AD = find(world, classname, "info_tfdetect");
|
||||
AD = find(NIL, classname, "info_tfdetect");
|
||||
|
||||
if (AD)
|
||||
{
|
||||
|
@ -1211,7 +1211,7 @@ void(float inp) Menu_Engineer_Input =
|
|||
if (self.has_teleporter == 1)
|
||||
{
|
||||
local float r;
|
||||
te = find(world, classname, "building_teleporter");
|
||||
te = find(NIL, classname, "building_teleporter");
|
||||
while (te)
|
||||
{
|
||||
if (te.real_owner == self)
|
||||
|
@ -1262,12 +1262,12 @@ void(float inp) Menu_Engineer_Input =
|
|||
}
|
||||
|
||||
// find if there are other generators too close, if this is our first generator only - nope
|
||||
if (infokey(world, "fieldtest") != "1")
|
||||
if (infokey(NIL, "fieldtest") != "1")
|
||||
{
|
||||
local float r, mindist;
|
||||
mindist = 3000;
|
||||
|
||||
te = find(world, classname, "building_fieldgen");
|
||||
te = find(NIL, classname, "building_fieldgen");
|
||||
while (te)
|
||||
{
|
||||
if (te.real_owner != self)
|
||||
|
@ -1343,7 +1343,7 @@ void(float inp) Menu_Engineer_Input =
|
|||
}
|
||||
else if (inp == 3 && self.has_tesla == TRUE)
|
||||
{
|
||||
te = find(world, classname, "building_tesla");
|
||||
te = find(NIL, classname, "building_tesla");
|
||||
while (te)
|
||||
{
|
||||
if (te.real_owner == self)
|
||||
|
@ -1381,7 +1381,7 @@ void(entity person, string build) Add_Building_Teamkill =
|
|||
bprint (PRINT_HIGH, build);
|
||||
bprint (PRINT_HIGH, "!\n");
|
||||
|
||||
st = infokey(world, "curse");
|
||||
st = infokey(NIL, "curse");
|
||||
if (st)
|
||||
threshold = stof(st);
|
||||
person.ff_count = person.ff_count + 2; //Increase their bastard rating
|
||||
|
@ -1414,7 +1414,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input =
|
|||
local float metalcost;
|
||||
local float am;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
local float iI; // is Improved?
|
||||
|
@ -1502,7 +1502,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input =
|
|||
{
|
||||
ResetMenu();
|
||||
self.impulse = 0;
|
||||
self.building = world;
|
||||
self.building = NIL;
|
||||
|
||||
bound_other_ammo(self);
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ void(float inp) Menu_EngineerFix_SentryGun_Input =
|
|||
local float am, metalcost;
|
||||
local string st;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp == 1)
|
||||
|
@ -1722,7 +1722,7 @@ void(float inp) Menu_EngineerFix_Sensor_Input =
|
|||
//*ch
|
||||
local float metalcost;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp == 1)
|
||||
|
@ -1778,7 +1778,7 @@ void(float inp) Menu_EngineerFix_Camera_Input =
|
|||
//*ch
|
||||
local float metalcost;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp == 1)
|
||||
|
@ -1834,7 +1834,7 @@ void(float inp) Menu_EngineerFix_Teleporter_Input =
|
|||
//*ch
|
||||
local float metalcost;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp == 1)
|
||||
|
@ -1903,7 +1903,7 @@ void(float inp) Menu_EngineerFix_FieldGen_Input =
|
|||
{
|
||||
local float metalcost;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp == 1)
|
||||
|
@ -2231,7 +2231,7 @@ void(float inp) Menu_EngineerFix_Tesla_Input =
|
|||
{
|
||||
local float cost = 0;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp <= 10 && inp >= 1)
|
||||
|
@ -2369,7 +2369,7 @@ void(float inp) Menu_EngineerFix_Tesla_Input2 =
|
|||
{
|
||||
local float cost = 0;
|
||||
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
if (inp <= 10 && inp >= 1)
|
||||
|
@ -2505,7 +2505,7 @@ void() Menu_Dispenser =
|
|||
|
||||
void(float inp) Menu_Dispenser_Input =
|
||||
{
|
||||
if (self.classname != "player" || self.building == world)
|
||||
if (self.classname != "player" || !self.building)
|
||||
return;
|
||||
|
||||
local float am, empty;
|
||||
|
@ -2612,7 +2612,7 @@ void(float inp) Menu_Dispenser_Input =
|
|||
sprint(self, PRINT_HIGH, "The dispenser is empty.\n");
|
||||
ResetMenu();
|
||||
self.impulse = 0;
|
||||
self.building = world;
|
||||
self.building = NIL;
|
||||
self.building_wait = time + 0.5;
|
||||
|
||||
bound_other_ammo(self);
|
||||
|
@ -2714,7 +2714,7 @@ void() Menu_PrimaryWeapon =
|
|||
void(float inp) Menu_PrimaryWeapon_Input =
|
||||
{
|
||||
local string st;
|
||||
st = infokey(world, "no_spam");
|
||||
st = infokey(NIL, "no_spam");
|
||||
if (inp <= 10 && inp >= 1)
|
||||
{
|
||||
//Snipe
|
||||
|
@ -3528,8 +3528,8 @@ void(float inp) Menu_Special_Input =
|
|||
#undef PRICE
|
||||
#define PRICE 650
|
||||
|
||||
//st = infokey(world, "no_grapple");
|
||||
st2 = infokey(world, "no_spam");
|
||||
//st = infokey(NIL, "no_grapple");
|
||||
st2 = infokey(NIL, "no_spam");
|
||||
if (inp == 1) {
|
||||
if (self.tf_items & NIT_SCANNER)
|
||||
{
|
||||
|
@ -3675,7 +3675,7 @@ l4 = "*
|
|||
void(float inp) Menu_Special2_Input =
|
||||
{
|
||||
local string st;
|
||||
st = infokey(world, "no_spam");
|
||||
st = infokey(NIL, "no_spam");
|
||||
|
||||
if (inp == 1)//SB Jammer
|
||||
BuyCuTF(1000, CUTF_JAMMER);
|
||||
|
@ -3815,8 +3815,8 @@ l4 = "1
|
|||
void(float inp) Menu_Gren1_Input =
|
||||
{
|
||||
local string st, st2;
|
||||
st = infokey(world, "no_gasgren");
|
||||
st2 = infokey (world, "no_spam");
|
||||
st = infokey(NIL, "no_gasgren");
|
||||
st2 = infokey (NIL, "no_spam");
|
||||
|
||||
if (inp == 1)
|
||||
BuyGren(500,GR_TYPE_NORMAL);
|
||||
|
@ -3935,8 +3935,8 @@ l4 = "1
|
|||
void(float inp) Menu_Gren2_Input =
|
||||
{
|
||||
local string st, st2;
|
||||
st = infokey(world, "no_antigrav");
|
||||
st2 = infokey(world, "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
|
||||
|
@ -4035,7 +4035,7 @@ void(float inp) Menu_Gren1_Input =
|
|||
{
|
||||
local string st2, st3;
|
||||
|
||||
st2 = infokey(world, "no_spam");
|
||||
st2 = infokey(NIL, "no_spam");
|
||||
|
||||
if (inp <= 10 && inp >= 1)
|
||||
{
|
||||
|
@ -4094,7 +4094,7 @@ void() Menu_Gren2 =
|
|||
{
|
||||
local string temp,st;
|
||||
temp = ftos(self.money);
|
||||
st = infokey(world, "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,
|
||||
|
@ -4130,9 +4130,9 @@ l4 = "*
|
|||
void(float inp) Menu_Gren2_Input =
|
||||
{
|
||||
local string st, st2,st3;
|
||||
st = infokey(world, "no_gasgren");
|
||||
st2 = infokey (world, "no_spam");
|
||||
st3 = infokey(world, "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) {
|
||||
|
|
2
misc.qc
2
misc.qc
|
@ -271,7 +271,7 @@ void() barrel_explode =
|
|||
self.takedamage = DAMAGE_NO;
|
||||
self.classname = "explo_box";
|
||||
// did say self.owner
|
||||
T_RadiusDamage (self, self, 160, world);
|
||||
T_RadiusDamage (self, self, 160, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
|
18
monsters.qc
18
monsters.qc
|
@ -238,7 +238,7 @@ void() t_movetarget =
|
|||
*/
|
||||
/*
|
||||
//RPrint ("t_movetarget\n");
|
||||
self.goalentity = self.movetarget = find (world, targetname, other.target);
|
||||
self.goalentity = self.movetarget = find (NIL, targetname, other.target);
|
||||
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
|
||||
if (!self.movetarget)
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ float() FindTarget =
|
|||
self.enemy = self.enemy.enemy;
|
||||
if (self.enemy.classname != "player")
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ void() walkmonster_start_go =
|
|||
|
||||
if (self.target)
|
||||
{
|
||||
self.goalentity = self.movetarget = find(world, targetname, self.target);
|
||||
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
|
||||
self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
|
||||
if (!self.movetarget)
|
||||
{
|
||||
|
@ -646,14 +646,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 = world;
|
||||
self.martyr_enemy.goalentity = NIL;
|
||||
|
||||
// OFTEN
|
||||
self.demon_two=world;
|
||||
self.demon_one=world;
|
||||
self.demon_two=NIL;
|
||||
self.demon_one=NIL;
|
||||
// OFTEN
|
||||
|
||||
self.goalentity = world;
|
||||
self.goalentity = NIL;
|
||||
}
|
||||
|
||||
// spread think times so they don't all happen at same time
|
||||
|
@ -696,7 +696,7 @@ void() flymonster_start_go =
|
|||
|
||||
if (self.target)
|
||||
{
|
||||
self.goalentity = self.movetarget = find(world, targetname, self.target);
|
||||
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
|
||||
if (!self.movetarget)
|
||||
{
|
||||
RPrint ("Monster can't find target at ");
|
||||
|
@ -750,7 +750,7 @@ void() swimmonster_start_go =
|
|||
|
||||
if (self.target)
|
||||
{
|
||||
self.goalentity = self.movetarget = find(world, targetname, self.target);
|
||||
self.goalentity = self.movetarget = find(NIL, targetname, self.target);
|
||||
if (!self.movetarget)
|
||||
{
|
||||
RPrint ("Monster can't find target at ");
|
||||
|
|
|
@ -720,7 +720,7 @@ void (entity targ, entity attacker) Obituary_Player_by_Player =
|
|||
attacker.inspirator.frags = attacker.inspirator.real_frags;
|
||||
}
|
||||
|
||||
if (attacker.aura && attacker.crusader_inspirator != world) {
|
||||
if (attacker.aura && attacker.crusader_inspirator) {
|
||||
attacker.crusader_inspirator.real_frags += 0.5;
|
||||
if (!(toggleflags & TFLAG_TEAMFRAGS))
|
||||
attacker.crusader_inspirator.frags = attacker.crusader_inspirator.real_frags;
|
||||
|
@ -1224,7 +1224,7 @@ void (entity targ, entity attacker) Obituary_Player_Misc =
|
|||
deathstring = " visits the Volcano God\n";
|
||||
} else if (attacker.classname == "explo_box") {
|
||||
deathstring = " blew up\n";
|
||||
} else if (attacker.solid == SOLID_BSP && attacker != world) {
|
||||
} else if (attacker.solid == SOLID_BSP && attacker) {
|
||||
deathstring = " was squished\n";
|
||||
} else if (attacker.classname == "trap_shooter"
|
||||
|| attacker.classname == "trap_spikeshooter"
|
||||
|
@ -1248,7 +1248,7 @@ void (entity targ, entity attacker) Obituary_Player_Misc =
|
|||
deathstring = " ate a lavaball\n";
|
||||
} else if (attacker.classname == "trigger_changelevel") {
|
||||
deathstring = " tried to leave\n";
|
||||
} else if (targ.deathtype == "falling" && attacker == world) {
|
||||
} else if (targ.deathtype == "falling" && !attacker) {
|
||||
targ.deathtype = "";
|
||||
deathstring = " fell to his death\n";
|
||||
} else { //- OfN - unknown death by himself
|
||||
|
@ -2366,7 +2366,7 @@ void (entity targ, entity attacker) Obituary_Monster_Misc =
|
|||
|
||||
if (attacker.classname == "explo_box")
|
||||
deathstring = " blew up\n";
|
||||
else if (attacker.solid == SOLID_BSP && attacker != world)
|
||||
else if (attacker.solid == SOLID_BSP && attacker)
|
||||
deathstring = " was squished\n";
|
||||
else if (attacker.classname == "trap_shooter"
|
||||
|| attacker.classname == "trap_spikeshooter"
|
||||
|
|
94
often.qc
94
often.qc
|
@ -28,130 +28,130 @@ void () UpdateInfos =
|
|||
{
|
||||
local string st;
|
||||
|
||||
st = infokey(world, "allow_debug"); //
|
||||
st = infokey(NIL, "allow_debug"); //
|
||||
if (st == "1" || st =="on")
|
||||
allow_debug = 1;
|
||||
else
|
||||
{
|
||||
debug_target=world;
|
||||
debug_target=NIL;
|
||||
allow_debug = 0;
|
||||
}
|
||||
|
||||
/*st = infokey(world, "cool_gibs"); //
|
||||
/*st = infokey(NIL, "cool_gibs"); //
|
||||
if (st == "1" || st =="on")
|
||||
cool_gibs = 1;
|
||||
else
|
||||
cool_gibs = 0;*/
|
||||
|
||||
st = infokey(world, "pay_msgs"); //
|
||||
st = infokey(NIL, "pay_msgs"); //
|
||||
if (st == "1" || st =="on")
|
||||
pay_msgs = 1;
|
||||
else
|
||||
pay_msgs = 0;
|
||||
|
||||
st = infokey(world, "team_prefix"); //
|
||||
st = infokey(NIL, "team_prefix"); //
|
||||
if (st == "1" || st =="on")
|
||||
team_prefix = 1;
|
||||
else
|
||||
team_prefix = 0;
|
||||
|
||||
/*st = infokey(world, "allow_mauser"); //
|
||||
/*st = infokey(NIL, "allow_mauser"); //
|
||||
if (st == "1" || st =="on")
|
||||
allow_mauser = 1;
|
||||
else
|
||||
allow_mauser = 0;*/
|
||||
|
||||
st = infokey(world, "headless"); //
|
||||
st = infokey(NIL, "headless"); //
|
||||
if (st == "1" || st =="on" )
|
||||
headless = 1;
|
||||
else
|
||||
headless = 0;
|
||||
|
||||
st = infokey(world, "no_grapple"); //
|
||||
st = infokey(NIL, "no_grapple"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_grapple = 1;
|
||||
else
|
||||
no_grapple = 0;
|
||||
|
||||
st = infokey(world, "no_army"); //
|
||||
st = infokey(NIL, "no_army"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_army = 1;
|
||||
else
|
||||
no_army = 0;
|
||||
|
||||
st = infokey(world, "nicecolors"); //
|
||||
st = infokey(NIL, "nicecolors"); //
|
||||
if (st == "1" || st =="on" )
|
||||
nicecolors = 1;
|
||||
else
|
||||
nicecolors = 0;
|
||||
|
||||
st = infokey(world, "relax_cheatcheck"); //
|
||||
st = infokey(NIL, "relax_cheatcheck"); //
|
||||
if (st == "1" || st =="on" )
|
||||
relax_cheatcheck = 1;
|
||||
else
|
||||
relax_cheatcheck = 0;
|
||||
|
||||
/*st = infokey(world, "allow_antigrav"); //
|
||||
/*st = infokey(NIL, "allow_antigrav"); //
|
||||
if (st == "1" || st =="on" )
|
||||
allow_antigrav = 1;
|
||||
else
|
||||
allow_antigrav = 0;*/
|
||||
|
||||
st = infokey(world, "no_clusters"); //
|
||||
st = infokey(NIL, "no_clusters"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_clusters = 1;
|
||||
else
|
||||
no_clusters = 0;
|
||||
|
||||
st = infokey(world, "no_c4"); //
|
||||
st = infokey(NIL, "no_c4"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_c4 = 1;
|
||||
else
|
||||
no_c4 = 0;
|
||||
|
||||
st = infokey(world, "no_otr"); //
|
||||
st = infokey(NIL, "no_otr"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_otr = 1;
|
||||
else
|
||||
no_otr = 0;
|
||||
|
||||
st = infokey(world, "no_laser"); //
|
||||
st = infokey(NIL, "no_laser"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_laser = 1;
|
||||
else
|
||||
no_laser = 0;
|
||||
|
||||
st = infokey(world, "no_detpush"); //
|
||||
st = infokey(NIL, "no_detpush"); //
|
||||
if (st == "0" || st =="off" )
|
||||
no_detpush = 0;
|
||||
else
|
||||
no_detpush = 1;
|
||||
|
||||
st = infokey(world, "no_monstercolors"); //
|
||||
st = infokey(NIL, "no_monstercolors"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_monstercolors = 1;
|
||||
else
|
||||
no_monstercolors = 0;
|
||||
|
||||
st = infokey(world, "no_chaplan"); //
|
||||
st = infokey(NIL, "no_chaplan"); //
|
||||
if (st == "1" || st =="on" )
|
||||
no_chaplan = 1;
|
||||
else
|
||||
no_chaplan = 0;
|
||||
|
||||
st = infokey(world, "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(world, "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(world, "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(world, "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(world, "allow_watermonsters"); //
|
||||
st = infokey(NIL, "allow_watermonsters"); //
|
||||
if (st == "1" || st =="on" )
|
||||
allow_watermonsters = 1;
|
||||
else
|
||||
|
@ -189,7 +189,7 @@ void(float tno, entity ignore) teamprefixsprint =
|
|||
if (tno == 0)
|
||||
return;
|
||||
|
||||
te = find(world, 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(world, 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(world, 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(world, 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(world, classname, "holo");
|
||||
te = find(NIL, classname, "holo");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == player) {
|
||||
|
@ -560,7 +560,7 @@ void() FlareGrenadeTouch =
|
|||
//setmodel (self, "progs/flare.mdl");
|
||||
}
|
||||
|
||||
if (other == world && self.movetype != MOVETYPE_BOUNCE)
|
||||
if (!other && self.movetype != MOVETYPE_BOUNCE)
|
||||
{
|
||||
self.velocity = '0 0 0';
|
||||
|
||||
|
@ -900,7 +900,7 @@ float() CheckEnemyDismantle =
|
|||
//- OfN - Checks spots are visible between them
|
||||
float (vector spot1, vector spot2) vis2orig =
|
||||
{
|
||||
traceline (spot1, spot2, TRUE, world); // see through other monsters
|
||||
traceline (spot1, spot2, TRUE, NIL); // see through other monsters
|
||||
|
||||
if (trace_inopen && trace_inwater)
|
||||
return FALSE; // sight line crossed contents
|
||||
|
@ -917,8 +917,8 @@ float() GetNoPlayers =
|
|||
local float num_players = 0;
|
||||
local entity search;
|
||||
|
||||
search = find (world, classname, "player");
|
||||
while (search != world)
|
||||
search = find (NIL, classname, "player");
|
||||
while (search)
|
||||
{
|
||||
num_players = num_players + 1;
|
||||
search = find (search, classname, "player");
|
||||
|
@ -935,12 +935,12 @@ entity() GetBestPlayer =
|
|||
local float bestscore;
|
||||
local entity theplayer, search;
|
||||
|
||||
theplayer = world;
|
||||
search = world;
|
||||
theplayer = NIL;
|
||||
search = NIL;
|
||||
bestscore = 0;
|
||||
|
||||
search = find (world, classname, "player");
|
||||
while (search != world)
|
||||
search = find (NIL, classname, "player");
|
||||
while (search)
|
||||
{
|
||||
if (search.frags > bestscore)
|
||||
{
|
||||
|
@ -959,12 +959,12 @@ entity() GetBestKiller =
|
|||
local float bestscore;
|
||||
local entity theplayer, search;
|
||||
|
||||
theplayer = world;
|
||||
search = world;
|
||||
theplayer = NIL;
|
||||
search = NIL;
|
||||
bestscore = 0;
|
||||
|
||||
search = find (world, classname, "player");
|
||||
while (search != world)
|
||||
search = find (NIL, classname, "player");
|
||||
while (search)
|
||||
{
|
||||
if (search.frags - TeamFortress_TeamGetScore(search.team_no) > bestscore && search.team_no > 0)
|
||||
{
|
||||
|
@ -1015,7 +1015,7 @@ void() PrintResults =
|
|||
bprint(PRINT_HIGH,"Âåóô Ðìáùåò: ");
|
||||
theplayer = GetBestPlayer();
|
||||
|
||||
if (theplayer != world)
|
||||
if (theplayer)
|
||||
{
|
||||
bprint(PRINT_HIGH,theplayer.netname);
|
||||
bprint(PRINT_HIGH," (");
|
||||
|
@ -1030,7 +1030,7 @@ void() PrintResults =
|
|||
bprint(PRINT_HIGH,"\nËéììéîç Íáãèéîå: ");
|
||||
theplayer = GetBestKiller();
|
||||
|
||||
if (theplayer != world)
|
||||
if (theplayer)
|
||||
{
|
||||
bprint(PRINT_HIGH,theplayer.netname);
|
||||
bprint(PRINT_HIGH," (");
|
||||
|
@ -1158,7 +1158,7 @@ float(entity theplayer, float grenslot) GetMaxGrens =
|
|||
}
|
||||
|
||||
|
||||
if (self.enemy!=self && self.enemy!=world && self.enemy!=attacker && self.enemy!=attacker.owner)
|
||||
if (self.enemy!=self && self.enemy && self.enemy!=attacker && self.enemy!=attacker.owner)
|
||||
{
|
||||
if (!visible(self.enemy))
|
||||
{
|
||||
|
@ -1190,7 +1190,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(world, classname, "building_camera");
|
||||
camera = find(NIL, classname, "building_camera");
|
||||
if (camera.real_owner == player)
|
||||
done = TRUE;
|
||||
while (!done)
|
||||
|
@ -1198,11 +1198,11 @@ void(entity player) SwitchToCamera =
|
|||
camera = find(camera, classname, "building_camera");
|
||||
if (camera.real_owner == player)
|
||||
done = TRUE;
|
||||
if (camera == world)
|
||||
if (!camera)
|
||||
done = TRUE;
|
||||
}
|
||||
|
||||
if (camera == world)
|
||||
if (!camera)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,7 +20,7 @@ float(entity targ, entity checker, float chkvis, float chkrng, float istesla, fl
|
|||
if (targ.classname != "player")
|
||||
return FALSE;
|
||||
if (chkcease)
|
||||
if (infokey(world,"ceasefire")=="on")
|
||||
if (infokey(NIL,"ceasefire")=="on")
|
||||
return FALSE;
|
||||
if (targ.playerclass == PC_UNDEFINED)
|
||||
return FALSE;
|
||||
|
@ -200,17 +200,17 @@ bprint(PRINT_HIGH, "\n");
|
|||
void(string search, entity person, float chkown) Find_And_Dmg =
|
||||
{
|
||||
local entity te;
|
||||
te = find(world, classname, search);
|
||||
te = find(NIL, classname, search);
|
||||
while (te)
|
||||
{
|
||||
if (chkown)
|
||||
{
|
||||
if (te.real_owner == person)
|
||||
TF_T_Damage(te, world, world, te.health+100, 0, 0);
|
||||
TF_T_Damage(te, NIL, NIL, te.health+100, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
TF_T_Damage(te, world, world, te.health+100, 0, 0);
|
||||
TF_T_Damage(te, NIL, NIL, te.health+100, 0, 0);
|
||||
}
|
||||
te = find(te, classname, search);
|
||||
}
|
||||
|
|
4
plats.qc
4
plats.qc
|
@ -309,7 +309,7 @@ void() train_next =
|
|||
{
|
||||
local entity targ;
|
||||
|
||||
targ = find (world, 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 (world, targetname, self.target);
|
||||
targ = find (NIL, targetname, self.target);
|
||||
self.target = targ.target;
|
||||
setorigin (self, targ.origin - self.mins);
|
||||
if (!self.targetname)
|
||||
|
|
10
player.qc
10
player.qc
|
@ -164,10 +164,10 @@ 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(world, netname, "biotimer");
|
||||
while ((te.owner != self) && (te != world))
|
||||
te = find(NIL, netname, "biotimer");
|
||||
while ((te.owner != self) && (te))
|
||||
te = find(te, netname, "biotimer");
|
||||
if (te != world)
|
||||
if (te)
|
||||
Bio.enemy = te.enemy; //Person infecting
|
||||
else
|
||||
RPrint("CustomTF: Odd Behavior in infection spreading");
|
||||
|
@ -1274,7 +1274,7 @@ void() PlayerDie =
|
|||
finished = TRUE;
|
||||
if (self.tfstate & TFSTATE_INFECTED && self == self.enemy)
|
||||
{
|
||||
te = find(world, classname, "timer");
|
||||
te = find(NIL, classname, "timer");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self && te.think == BioInfection_Decay)
|
||||
|
@ -1287,7 +1287,7 @@ void() PlayerDie =
|
|||
}
|
||||
|
||||
te = find(te, classname, "timer");
|
||||
if (finished) te = world;
|
||||
if (finished) te = NIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ typedef struct
|
|||
{ int pad[28];
|
||||
int self;
|
||||
int other;
|
||||
int world;
|
||||
int NIL;
|
||||
float time;
|
||||
float frametime;
|
||||
float force_retouch;
|
||||
|
|
36
pyro.qc
36
pyro.qc
|
@ -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 : world 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 world;
|
||||
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 world;
|
||||
return NIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,25 +133,25 @@ float (string id_flame) RemoveFlameFromQueue =
|
|||
|
||||
num_world_flames = num_world_flames - 1;
|
||||
|
||||
tmp = find(world, 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(world, flame_id, "3");
|
||||
tmp = find(NIL, flame_id, "3");
|
||||
if (!tmp)
|
||||
{
|
||||
if (id_flame == "3")
|
||||
return FALSE;
|
||||
|
||||
tmp = find(world, flame_id, "2");
|
||||
tmp = find(NIL, flame_id, "2");
|
||||
if (!tmp)
|
||||
{
|
||||
if (id_flame == "2")
|
||||
return FALSE;
|
||||
|
||||
tmp = find(world, flame_id, "1");
|
||||
tmp = find(NIL, flame_id, "1");
|
||||
if (!tmp)
|
||||
{
|
||||
// oh shit, no flames found!
|
||||
|
@ -281,7 +281,7 @@ void (vector org, entity shooter) NapalmGrenadeLaunch =
|
|||
zdir = 40 * random();
|
||||
|
||||
newmis = FlameSpawn ("2", shooter);
|
||||
if (newmis == world)
|
||||
if (!newmis)
|
||||
return;
|
||||
|
||||
self.touch = NIL;
|
||||
|
@ -422,7 +422,7 @@ void() OnPlayerFlame_touch =
|
|||
local entity flame;
|
||||
local vector vtemp;
|
||||
|
||||
if (other != world && other.health > 0 && other != self.enemy)
|
||||
if (other && other.health > 0 && other != self.enemy)
|
||||
{
|
||||
|
||||
if (other.numflames >= FLAME_MAXPLYRFLAMES)
|
||||
|
@ -445,7 +445,7 @@ void() OnPlayerFlame_touch =
|
|||
else
|
||||
{
|
||||
flame = FlameSpawn ("3", other);
|
||||
if (flame == world)
|
||||
if (!flame)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -477,7 +477,7 @@ void() WorldFlame_touch =
|
|||
deathmsg = DMSG_FLAME;
|
||||
TF_T_Damage(other, self, self.enemy, 2, TF_TD_NOTTEAM, TF_TD_FIRE);
|
||||
|
||||
if (other != world && other.solid != SOLID_TRIGGER && other.health > 0)
|
||||
if (other && other.solid != SOLID_TRIGGER && other.health > 0)
|
||||
{
|
||||
|
||||
if (other.numflames >= FLAME_MAXPLYRFLAMES)
|
||||
|
@ -499,7 +499,7 @@ void() WorldFlame_touch =
|
|||
else
|
||||
{
|
||||
flame = FlameSpawn ("3", other);
|
||||
if (flame == world)
|
||||
if (!flame)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ void() Flamer_stream_touch =
|
|||
//WK Sweep for mines at point of contact
|
||||
GuerillaMineSweep(self.origin);
|
||||
|
||||
if (other != world)
|
||||
if (other)
|
||||
{
|
||||
if (other.takedamage == DAMAGE_AIM && other.health > 0)
|
||||
{
|
||||
|
@ -587,7 +587,7 @@ void() Flamer_stream_touch =
|
|||
else
|
||||
{
|
||||
flame = FlameSpawn("3", other);
|
||||
if (flame == world)
|
||||
if (!flame)
|
||||
return;
|
||||
}
|
||||
flame.classname = "fire";
|
||||
|
@ -615,7 +615,7 @@ void() Flamer_stream_touch =
|
|||
return;
|
||||
}
|
||||
flame = FlameSpawn("4", other);
|
||||
if (flame != world)
|
||||
if (flame)
|
||||
{
|
||||
flame.touch = WorldFlame_touch;
|
||||
flame.classname = "fire";
|
||||
|
@ -641,7 +641,7 @@ void() Napalm_touch =
|
|||
if (other.classname == "fire")
|
||||
return;
|
||||
|
||||
if (other != world)
|
||||
if (other)
|
||||
{
|
||||
if (other.takedamage == DAMAGE_AIM && other.health > 0)
|
||||
{
|
||||
|
@ -671,7 +671,7 @@ void() Napalm_touch =
|
|||
else
|
||||
{
|
||||
flame = FlameSpawn("3", other);
|
||||
if (flame == world)
|
||||
if (!flame)
|
||||
return;
|
||||
}
|
||||
flame.classname = "fire";
|
||||
|
@ -694,7 +694,7 @@ void() Napalm_touch =
|
|||
else
|
||||
{
|
||||
flame = FlameSpawn("4", other);
|
||||
if (flame != world)
|
||||
if (flame)
|
||||
{
|
||||
flame.touch = WorldFlame_touch;
|
||||
flame.classname = "fire";
|
||||
|
|
16
rotate.qc
16
rotate.qc
|
@ -128,7 +128,7 @@ void() RotateTargets =
|
|||
|
||||
makevectors (self.angles);
|
||||
|
||||
ent = find( world, targetname, self.target);
|
||||
ent = find( NIL, targetname, self.target);
|
||||
while( ent )
|
||||
{
|
||||
if ( ent.rotate_type == OBJECT_SETORIGIN )
|
||||
|
@ -171,7 +171,7 @@ void() RotateTargetsFinal =
|
|||
{
|
||||
local entity ent;
|
||||
|
||||
ent = find( world, 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( world, 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( world, 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( world, 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 (world, 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 ( world, 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( world, group, name);
|
||||
self = find( NIL, group, name);
|
||||
while( self )
|
||||
{
|
||||
rotate_door_reversedirection();
|
||||
|
|
24
sbitems.qc
24
sbitems.qc
|
@ -58,7 +58,7 @@ void() SwitchToCamera =
|
|||
if (self.is_cameraviewing)
|
||||
return;
|
||||
|
||||
camera = find(world, classname, "building_camera");
|
||||
camera = find(NIL, classname, "building_camera");
|
||||
if (camera.real_owner == self)
|
||||
done = TRUE;
|
||||
while (!done)
|
||||
|
@ -66,11 +66,11 @@ void() SwitchToCamera =
|
|||
camera = find(camera, classname, "building_camera");
|
||||
if (camera.real_owner == self)
|
||||
done = TRUE;
|
||||
if (camera == world)
|
||||
if (!camera)
|
||||
done = TRUE;
|
||||
}
|
||||
|
||||
if (camera == world)
|
||||
if (!camera)
|
||||
return;
|
||||
|
||||
msg_entity = self;
|
||||
|
@ -117,7 +117,7 @@ void() PrimeC4Det =
|
|||
{
|
||||
local entity te;
|
||||
|
||||
if (infokey (world, "no_spam") == "on")
|
||||
if (infokey (NIL, "no_spam") == "on")
|
||||
{
|
||||
sprint(self,PRINT_HIGH,"The admin has disabled spam devices on this map.\n");
|
||||
return;
|
||||
|
@ -319,7 +319,7 @@ void() SBBuildSensor =
|
|||
|
||||
void() MotionSensorTossTouch =
|
||||
{
|
||||
if (other != world || other == self.real_owner)
|
||||
if (other || other == self.real_owner)
|
||||
return;
|
||||
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID)
|
||||
{
|
||||
|
@ -370,7 +370,7 @@ void() MotionSensorIdle =
|
|||
|
||||
float() MotionSensorFindTarget =
|
||||
{
|
||||
local entity client = world;
|
||||
local entity client = NIL;
|
||||
local float r, gotone, loopc;
|
||||
|
||||
// Try a few checks to make it react faster
|
||||
|
@ -417,7 +417,7 @@ float() MotionSensorFindTarget =
|
|||
self.enemy = self.enemy.enemy;
|
||||
if (self.enemy.classname != "player")
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
}*/ // OfN - wtf does this?
|
||||
|
@ -493,7 +493,7 @@ void() MotionSensorSpawn =
|
|||
newmis.classname = "building_sensor";
|
||||
newmis.netname = "motion_sensor";
|
||||
setorigin (newmis, self.origin);
|
||||
newmis.owner = world;
|
||||
newmis.owner = NIL;
|
||||
newmis.real_owner = self;
|
||||
makevectors (self.v_angle);
|
||||
newmis.avelocity = '0 0 0';
|
||||
|
@ -547,7 +547,7 @@ void() MotionSensorDie =
|
|||
|
||||
void() AntiGravGrenadeExplode =
|
||||
{
|
||||
T_RadiusAntiGrav (self, self.owner, 100, world);
|
||||
T_RadiusAntiGrav (self, self.owner, 100, NIL);
|
||||
|
||||
#ifdef DEMO_STUFF
|
||||
// Remove any camera's locks on this missile
|
||||
|
@ -607,10 +607,10 @@ 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(world, classname, "timer");
|
||||
while (((te.owner != head) || (te.think != AntiGravGrenadeTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != head) || (te.think != AntiGravGrenadeTimer)) && (te))
|
||||
te = find(te, classname, "timer");
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
head.gravity = 0.3 * random();
|
||||
te.health = 100;
|
||||
|
|
14
scout.qc
14
scout.qc
|
@ -180,7 +180,7 @@ void() ConcussionGrenadeTouch =
|
|||
// Concussion grenade explosion function
|
||||
void() ConcussionGrenadeExplode =
|
||||
{
|
||||
T_RadiusBounce (self, self.owner, 240, world);
|
||||
T_RadiusBounce (self, self.owner, 240, NIL);
|
||||
|
||||
#ifdef DEMO_STUFF
|
||||
// Remove any camera's locks on this missile
|
||||
|
@ -670,10 +670,10 @@ void(entity inflictor, entity attacker, float bounce, entity ignore) T_RadiusBou
|
|||
// Concuss 'em!!
|
||||
// If they are already concussed, set the concussion back up
|
||||
// Try to find a concusstimer entity for this player
|
||||
te = find(world, classname, "timer");
|
||||
while (((te.owner != head) || (te.think != ConcussionGrenadeTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != head) || (te.think != ConcussionGrenadeTimer)) && (te))
|
||||
te = find(te, classname, "timer");
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
stuffcmd(head,"v_idlescale 100\n");
|
||||
te.health = 100;
|
||||
|
@ -744,8 +744,8 @@ entity(entity scanner, float scanrange, float enemies, float friends) T_RadiusSc
|
|||
local entity list_head;
|
||||
local entity list;
|
||||
local float gotatarget;
|
||||
list_head = world;
|
||||
list = world;
|
||||
list_head = NIL;
|
||||
list = NIL;
|
||||
|
||||
head = findradius(scanner.origin, scanrange+40);
|
||||
|
||||
|
@ -872,7 +872,7 @@ void() CaltropGrenadeExplode =
|
|||
local float i;
|
||||
|
||||
/* deathmsg = DMSG_GREN_CALTROP;
|
||||
T_RadiusDamage (self, self.owner, 50, world);
|
||||
T_RadiusDamage (self, self.owner, 50, NIL);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
|
|
12
security.qc
12
security.qc
|
@ -32,7 +32,7 @@ void() Security_Camera_Idle =
|
|||
//========
|
||||
float() Security_Camera_FindTarget =
|
||||
{
|
||||
local entity client = world;
|
||||
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 = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ float() Security_Camera_FindTarget =
|
|||
|
||||
float() Security_Camera_FindFakeTarget =
|
||||
{
|
||||
local entity client = world;
|
||||
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 = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ void() Security_Camera_Spawn =
|
|||
newmis.classname = "building_camera";
|
||||
newmis.netname = "security_camera";
|
||||
setorigin (newmis, self.origin);
|
||||
newmis.owner = world;
|
||||
newmis.owner = NIL;
|
||||
newmis.real_owner = self;
|
||||
makevectors (self.v_angle);
|
||||
newmis.avelocity = '0 0 0';
|
||||
|
@ -261,7 +261,7 @@ void() Security_Camera_Spawn =
|
|||
//========
|
||||
void() SecurityCameraTossTouch =
|
||||
{
|
||||
if (other != world || other == self.real_owner)
|
||||
if (other || other == self.real_owner)
|
||||
return;
|
||||
if (pointcontents(self.origin) == CONTENTS_SKY || pointcontents(self.origin + '0 0 2') == CONTENTS_SKY || pointcontents(self.origin) == CONTENTS_SOLID)
|
||||
{
|
||||
|
|
28
sentry.qc
28
sentry.qc
|
@ -65,7 +65,7 @@ void() lvl1_sentry_stand =[ $lvl1_stand1, lvl1_sentry_stand ] {RemoveGlow(); S
|
|||
void() lvl1_sentry_atk1 =[ $lvl1_shoot1, lvl1_sentry_atk3 ]
|
||||
{
|
||||
ai_face();
|
||||
if (self.enemy == world || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
if (!self.enemy || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
lvl1_sentry_stand();
|
||||
else if (self.ammo_shells <= 0)
|
||||
lvl1_sentry_stand();
|
||||
|
@ -87,7 +87,7 @@ void() lvl2_sentry_stand= [ $lvl2_stand1, lvl2_sentry_stand ] {RemoveGlow();
|
|||
void() lvl2_sentry_atk1 = [ $lvl2_shoot1, lvl2_sentry_atk2 ]
|
||||
{
|
||||
ai_face();
|
||||
if (self.enemy == world || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
if (!self.enemy || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
lvl2_sentry_stand();
|
||||
else if (self.ammo_shells <= 0)
|
||||
lvl2_sentry_stand();
|
||||
|
@ -114,7 +114,7 @@ void() lvl3_sentry_stand= [ $lvl3_stand1, lvl3_sentry_stand ] {RemoveGlow();
|
|||
void() lvl3_sentry_atk1 = [ $lvl3_shoot1, lvl3_sentry_atk2 ]
|
||||
{
|
||||
ai_face();
|
||||
if (self.enemy == world || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
if (!self.enemy || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
lvl3_sentry_stand();
|
||||
else if (self.ammo_shells <= 0 && self.ammo_rockets <= 0)
|
||||
lvl3_sentry_stand();
|
||||
|
@ -140,7 +140,7 @@ void() lvl3_sentry_atk3 =[ $lvl3_stand1, lvl3_sentry_atk1 ]
|
|||
void() lvl3_sentry_atk4 = [ $lvl3_stand1, lvl3_sentry_atk5 ]
|
||||
{
|
||||
ai_face();
|
||||
if (self.enemy == world || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
if (!self.enemy || self.enemy.health <= 0 || /* !visible(self.enemy) || */ self.enemy.has_disconnected == TRUE) //CH
|
||||
lvl3_sentry_stand();
|
||||
else if (self.ammo_shells <= 0 && self.ammo_rockets <= 0)
|
||||
lvl3_sentry_stand();
|
||||
|
@ -164,7 +164,7 @@ void() Sentry_Rotate =
|
|||
if (self.tf_items & NIT_TURRET)
|
||||
testpoint_z -= 40;
|
||||
if (pointcontents (testpoint) == CONTENTS_SOLID) {
|
||||
TF_T_Damage (self, world, world, self.health + 100,
|
||||
TF_T_Damage (self, NIL, NIL, self.health + 100,
|
||||
TF_TD_IGNOREARMOUR, TF_TD_OTHER);
|
||||
return;
|
||||
}
|
||||
|
@ -244,12 +244,12 @@ float(entity targ) rangesentry =
|
|||
|
||||
float() Sentry_FindTarget =
|
||||
{
|
||||
self.enemy = world; //CH for sbar
|
||||
self.enemy = NIL; //CH for sbar
|
||||
|
||||
if (infokey(world,"ceasefire")=="on")
|
||||
if (infokey(NIL,"ceasefire")=="on")
|
||||
return FALSE;
|
||||
|
||||
local entity client = world;
|
||||
local entity client = NIL;
|
||||
local float r, gotone, loopc;
|
||||
|
||||
//WK Hack to get floating sentry working
|
||||
|
@ -319,9 +319,9 @@ float() Sentry_FindTarget =
|
|||
{
|
||||
local entity te;
|
||||
|
||||
te = find(world, message,"XX");
|
||||
te = find(NIL, message,"XX");
|
||||
|
||||
while (te != world && gotone == FALSE)
|
||||
while (te && gotone == FALSE)
|
||||
{
|
||||
gotone = TRUE;
|
||||
|
||||
|
@ -395,7 +395,7 @@ float() Sentry_FindTarget =
|
|||
self.enemy = self.enemy.enemy;
|
||||
if (self.enemy.classname != "player")
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
}*/
|
||||
|
@ -514,7 +514,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(world,"ceasefire")=="on") //Cyto
|
||||
if (infokey(NIL,"ceasefire")=="on") //Cyto
|
||||
return FALSE;
|
||||
|
||||
//WK Stop gun from shooting at dead spies
|
||||
|
@ -639,7 +639,7 @@ float() Sentry_Fire =
|
|||
{
|
||||
local float damg;
|
||||
damg = random() * 50 + 120;
|
||||
T_RadiusDamage(self, self, damg, world);
|
||||
T_RadiusDamage(self, self, damg, NIL);
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_EXPLOSION);
|
||||
WriteCoord (MSG_MULTICAST, self.origin_x);
|
||||
|
@ -779,7 +779,7 @@ void() Sentry_Touch =
|
|||
Sentry_Die();
|
||||
return;
|
||||
}
|
||||
if (other == world) { //The eagle has landed!
|
||||
if (!other) { //The eagle has landed!
|
||||
// sprint(self.real_owner, PRINT_HIGH, "The eagle has landed!\n");
|
||||
self.flags = self.flags | FL_ONGROUND;
|
||||
self.movetype = MOVETYPE_STEP;
|
||||
|
|
|
@ -181,7 +181,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 = world;
|
||||
self.enemy = NIL;
|
||||
// FIXME: look all around for other targets
|
||||
/*if (self.oldenemy.health > 0)
|
||||
{
|
||||
|
@ -216,7 +216,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 = world;
|
||||
self.enemy = NIL;
|
||||
// FIXME: look all around for other targets
|
||||
/*if (self.oldenemy.health > 0)
|
||||
{
|
||||
|
@ -422,7 +422,7 @@ void() custom_shambler_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your shambler is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
}
|
||||
|
||||
// check for gib
|
||||
|
|
|
@ -27,7 +27,7 @@ void() SpectatorConnect =
|
|||
stuffcmd(self, "bind 0 \"impulse 10\"\n");
|
||||
TeamFortress_Alias("id", TF_ID, 0);
|
||||
|
||||
self.goalentity = world; // used for impulse 1 below
|
||||
self.goalentity = NIL; // used for impulse 1 below
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -58,9 +58,9 @@ void() SpectatorImpulseCommand =
|
|||
// note that if the spectator is tracking, this doesn't do
|
||||
// much
|
||||
self.goalentity = find(self.goalentity, classname, "info_player_deathmatch");
|
||||
if (self.goalentity == world)
|
||||
if (!self.goalentity)
|
||||
self.goalentity = find(self.goalentity, classname, "info_player_deathmatch");
|
||||
if (self.goalentity != world) {
|
||||
if (self.goalentity) {
|
||||
setorigin(self, self.goalentity.origin);
|
||||
self.angles = self.goalentity.angles;
|
||||
self.fixangle = TRUE; // turn this way immediately
|
||||
|
|
6
speed.qc
6
speed.qc
|
@ -17,7 +17,7 @@ void() Kick_My_Owner =
|
|||
|
||||
//Don't kick if cheats are off
|
||||
off = FALSE;
|
||||
nospeed = infokey(world,"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(world,"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(world,"nospeed");
|
||||
nospeed = infokey(NIL,"nospeed");
|
||||
if (nospeed) {
|
||||
off = stof(nospeed);
|
||||
}
|
||||
|
|
38
spy.qc
38
spy.qc
|
@ -211,7 +211,7 @@ void(float type) TeamFortress_SpyFeignDeath =
|
|||
at_spot = findradius(self.origin, 64);
|
||||
i = TRUE;
|
||||
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && at_spot.deadflag == DEAD_NO && self != at_spot)
|
||||
i = FALSE;
|
||||
|
@ -319,7 +319,7 @@ void(float type) TeamFortress_SpyFeignDeath =
|
|||
|
||||
// Check to make sure there isn't anyone on top of us
|
||||
at_spot = findradius(self.origin, 64);
|
||||
while (at_spot != world)
|
||||
while (at_spot)
|
||||
{
|
||||
if (at_spot.classname == "player" && self != at_spot && at_spot.is_feigning == TRUE)
|
||||
{
|
||||
|
@ -457,7 +457,7 @@ void() TeamFortress_SpyGoUndercover =
|
|||
self.is_undercover = 1;
|
||||
else
|
||||
self.is_undercover = 0;
|
||||
local entity ent = world;
|
||||
local entity ent = NIL;
|
||||
while (ent = find (ent, classname, "timer")) {
|
||||
if (ent.owner == self && ent.think == TeamFortress_SpyUndercoverThink) {
|
||||
ent.think = SUB_Remove;
|
||||
|
@ -479,14 +479,14 @@ void(entity spy) TeamFortress_SpyCalcName =
|
|||
// Find a player on the team the spy is disguised as to pretend to be
|
||||
if (spy.undercover_team != 0)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
// First, try to find a player with same color and skins
|
||||
if (te.team_no == spy.undercover_team && te.skin == spy.undercover_skin)
|
||||
{
|
||||
spy.undercover_name = te.netname;
|
||||
te = world;
|
||||
te = NIL;
|
||||
}
|
||||
else
|
||||
te = find(te, classname, "player");
|
||||
|
@ -495,13 +495,13 @@ void(entity spy) TeamFortress_SpyCalcName =
|
|||
// If we couldn't, just find one of that team
|
||||
if (!spy.undercover_name)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == spy.undercover_team)
|
||||
{
|
||||
spy.undercover_name = te.netname;
|
||||
te = world;
|
||||
te = NIL;
|
||||
}
|
||||
else
|
||||
te = find(te, classname, "player");
|
||||
|
@ -724,7 +724,7 @@ void() GasGrenadeMakeGas =
|
|||
|
||||
// Do the Effects
|
||||
te = findradius(self.origin, 200);
|
||||
while (te != world)
|
||||
while (te)
|
||||
{
|
||||
if (te.classname == "player" && te.deadflag == DEAD_NO)
|
||||
{
|
||||
|
@ -734,20 +734,20 @@ void() GasGrenadeMakeGas =
|
|||
// Damage
|
||||
deathmsg = DMSG_GREN_GAS;
|
||||
if (self.heat = 0)
|
||||
TF_T_Damage (te, world, 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, world, 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(world, classname, "timer");
|
||||
while (((timer.owner != te) || (timer.think != HallucinationTimer)) && (timer != world))
|
||||
timer = find(NIL, classname, "timer");
|
||||
while (((timer.owner != te) || (timer.think != HallucinationTimer)) && (timer))
|
||||
{
|
||||
timer = find(timer, classname, "timer");
|
||||
}
|
||||
if (timer != world)
|
||||
if (timer)
|
||||
{
|
||||
timer.health = timer.health + 50; //SB used to be 25
|
||||
if (timer.health > 100)
|
||||
|
@ -954,12 +954,12 @@ void() T_TranqDartTouch =
|
|||
// If they're already tranquilised, just make it last longer
|
||||
if (other.tfstate & TFSTATE_TRANQUILISED)
|
||||
{
|
||||
timer = find(world, classname, "timer");
|
||||
while (((timer.owner != other) || (timer.think != TranquiliserTimer2)) && (timer != world))
|
||||
timer = find(NIL, classname, "timer");
|
||||
while (((timer.owner != other) || (timer.think != TranquiliserTimer2)) && (timer))
|
||||
{
|
||||
timer = find(timer, classname, "timer");
|
||||
}
|
||||
if (timer != world)
|
||||
if (timer)
|
||||
{
|
||||
timer.nextthink = time + TRANQ_TIME;
|
||||
}
|
||||
|
@ -981,12 +981,12 @@ void() T_TranqDartTouch =
|
|||
// If they're already tranquilised, just make it last longer
|
||||
if (other.tfstate & TFSTATE_TRANQUILISED)
|
||||
{
|
||||
timer = find(world, classname, "timer");
|
||||
while (((timer.owner != other) || (timer.think != TranquiliserTimer)) && (timer != world))
|
||||
timer = find(NIL, classname, "timer");
|
||||
while (((timer.owner != other) || (timer.think != TranquiliserTimer)) && (timer))
|
||||
{
|
||||
timer = find(timer, classname, "timer");
|
||||
}
|
||||
if (timer != world)
|
||||
if (timer)
|
||||
{
|
||||
timer.nextthink = time + TRANQ_TIME;
|
||||
}
|
||||
|
|
12
status.qc
12
status.qc
|
@ -168,7 +168,7 @@ void(entity pl) RefreshStatusBar1 =
|
|||
local string s1, s2, s3, s4;
|
||||
local string s5, s6, s7;
|
||||
local entity sent;
|
||||
sent = world;
|
||||
sent = NIL;
|
||||
|
||||
if (pl.StatusBarSize == 0)
|
||||
{
|
||||
|
@ -184,7 +184,7 @@ void(entity pl) RefreshStatusBar1 =
|
|||
|
||||
do
|
||||
sent = find(sent, classname, "building_sentrygun");
|
||||
while (sent != world && sent.real_owner != self);
|
||||
while (sent && sent.real_owner != self);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ void(entity pl) RefreshStatusBar1 =
|
|||
s3 = ftos(floor((sent.health / sent.max_health) * 100));
|
||||
s4 = "% health ";
|
||||
|
||||
if (sent.enemy != world)
|
||||
if (sent.enemy)
|
||||
{
|
||||
s5 = "Attacking: ";
|
||||
s6 = sent.enemy.netname;
|
||||
|
@ -234,7 +234,7 @@ void(entity pl) RefreshStatusBar4 =
|
|||
local string s1, s2, s3, s4;
|
||||
local string s5, s6, s7;
|
||||
local entity sent;
|
||||
sent = world;
|
||||
sent = NIL;
|
||||
|
||||
if (pl.StatusBarSize == 0)
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ void(entity pl) RefreshStatusBar4 =
|
|||
|
||||
do
|
||||
sent = find(sent, classname, "building_tesla");
|
||||
while (sent != world && sent.real_owner != self);
|
||||
while (sent && sent.real_owner != self);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ void(entity pl) RefreshStatusBar4 =
|
|||
s2 = TeslaDetailsToString(sent);
|
||||
s3 = ftos(floor((sent.health / sent.max_health) * 100));
|
||||
s4 = "% health ";
|
||||
if (sent.oldenemy != world)
|
||||
if (sent.oldenemy)
|
||||
{
|
||||
s5 = "Attacking: ";
|
||||
s6 = sent.enemy.netname;
|
||||
|
|
4
subs.qc
4
subs.qc
|
@ -252,7 +252,7 @@ void() SUB_UseTargets =
|
|||
// kill the killtagets
|
||||
if (self.killtarget)
|
||||
{
|
||||
t = world;
|
||||
t = NIL;
|
||||
do
|
||||
{
|
||||
t = find (t, targetname, self.killtarget);
|
||||
|
@ -266,7 +266,7 @@ void() SUB_UseTargets =
|
|||
if (self.target)
|
||||
{
|
||||
act = activator;
|
||||
t = world;
|
||||
t = NIL;
|
||||
do
|
||||
{
|
||||
t = find (t, targetname, self.target);
|
||||
|
|
12
teleport.qc
12
teleport.qc
|
@ -25,12 +25,12 @@ void() Teleporter_touch =
|
|||
{
|
||||
if (Teleporter_check_person(other))
|
||||
{
|
||||
te = find(world, classname, "building_teleporter");
|
||||
while (!(te.real_owner == self.real_owner && te != self) && te != world)
|
||||
te = find(NIL, classname, "building_teleporter");
|
||||
while (!(te.real_owner == self.real_owner && te != self) && te)
|
||||
{
|
||||
te = find(te, classname, "building_teleporter");
|
||||
}
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
if (te.heat == 0 && te.ammo_cells >= TELEPORTER_CELLS)
|
||||
{
|
||||
|
@ -99,9 +99,9 @@ float(entity targ) Teleporter_check_person =
|
|||
CenterPrint(other, "There is no other teleporter!\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (infokey(world,"ceasefire")=="on") //To not cause loops
|
||||
if (infokey(NIL,"ceasefire")=="on") //To not cause loops
|
||||
return FALSE;
|
||||
if (targ == world)//that would be bad.
|
||||
if (!targ)//that would be bad.
|
||||
return FALSE;
|
||||
if (targ.done_custom & CUSTOM_BUILDING)
|
||||
return FALSE;
|
||||
|
@ -155,7 +155,7 @@ 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, world, world, self.health + 1, 0, 0);
|
||||
TF_T_Damage (self, NIL, NIL, self.health + 1, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
28
tesla.qc
28
tesla.qc
|
@ -315,7 +315,7 @@ float() Tesla_FindTarget =
|
|||
//else
|
||||
// self.origin_z = self.origin_z + 24;
|
||||
|
||||
self.oldenemy = world; //CH for sbar
|
||||
self.oldenemy = NIL; //CH for sbar
|
||||
|
||||
if (self.ammo_shells == 0)
|
||||
client = Tesla_RadiusScan (self, 400);
|
||||
|
@ -428,26 +428,26 @@ 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,world,world,self.health+100,0,0);
|
||||
TF_T_Damage(self,NIL,NIL,self.health+100,0,0);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//WK Stop gun from shooting at dead spies
|
||||
if (!self.enemy)
|
||||
return FALSE;
|
||||
if (self.enemy == world)
|
||||
if (!self.enemy)
|
||||
return FALSE;
|
||||
if (self.enemy == self)
|
||||
return FALSE;
|
||||
if (self.enemy.health <= 0)
|
||||
return FALSE;
|
||||
if (infokey(world,"ceasefire")=="on") //CH
|
||||
if (infokey(NIL,"ceasefire")=="on") //CH
|
||||
return FALSE;
|
||||
if (self.enemy.classname == "player")
|
||||
{
|
||||
if (self.enemy.has_disconnected)
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
if (!(self.tf_items & NIT_AUTOID))
|
||||
|
@ -505,7 +505,7 @@ float() Tesla_Fire =
|
|||
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 = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -521,7 +521,7 @@ float() Tesla_Fire =
|
|||
WriteCoord (MSG_MULTICAST, self.origin_x);
|
||||
WriteCoord (MSG_MULTICAST, self.origin_y);
|
||||
WriteCoord (MSG_MULTICAST, self.origin_z);
|
||||
T_RadiusDamage(self, self, damg, world);
|
||||
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;
|
||||
|
@ -617,7 +617,7 @@ float() Tesla_Fire =
|
|||
|
||||
if (self.enemy.health <= 0)
|
||||
{
|
||||
self.enemy = world;
|
||||
self.enemy = NIL;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -705,11 +705,11 @@ 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,world,world,self.health+100,0,0);
|
||||
TF_T_Damage(self,NIL,NIL,self.health+100,0,0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (other == world)
|
||||
if (!other)
|
||||
{ //The eagle has landed!
|
||||
// sprint(self.real_owner, PRINT_HIGH, "The eagle has landed!\n");
|
||||
self.solid = SOLID_BBOX;
|
||||
|
@ -874,7 +874,7 @@ entity(entity OldTesla) TeslaClone =
|
|||
local vector tmp1, tmp2;
|
||||
|
||||
//now hack inside hack! =)
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.is_haxxxoring) // if we r currently hacking...
|
||||
|
@ -895,7 +895,7 @@ entity(entity OldTesla) TeslaClone =
|
|||
te = find(te, classname, "player");
|
||||
}
|
||||
|
||||
te = find(world, classname, "monster_army");
|
||||
te = find(NIL, classname, "monster_army");
|
||||
while (te)
|
||||
{
|
||||
if (te.goalentity == OldTesla)
|
||||
|
@ -982,8 +982,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; //world;
|
||||
newmis.oldenemy = OldTesla.oldenemy; //world; //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
|
||||
|
|
58
tfort.qc
58
tfort.qc
|
@ -633,7 +633,7 @@ void() TeamFortress_Inventory =
|
|||
}
|
||||
|
||||
// GoalItems
|
||||
tg = find (world, classname, "item_tfgoal");
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.owner == self)
|
||||
|
@ -697,7 +697,7 @@ if (!invis_only)
|
|||
|
||||
if (self.has_sentry)
|
||||
{
|
||||
tg = find(world, classname, "building_sentrygun");
|
||||
tg = find(NIL, classname, "building_sentrygun");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -716,7 +716,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_tesla)
|
||||
{
|
||||
tg = find(world, classname, "building_tesla");
|
||||
tg = find(NIL, classname, "building_tesla");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -735,7 +735,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_dispenser)
|
||||
{
|
||||
tg = find(world, classname, "building_dispenser");
|
||||
tg = find(NIL, classname, "building_dispenser");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -754,7 +754,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_sensor)
|
||||
{
|
||||
tg = find(world, classname, "building_sensor");
|
||||
tg = find(NIL, classname, "building_sensor");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -773,7 +773,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_camera)
|
||||
{
|
||||
tg = find(world, classname, "building_camera");
|
||||
tg = find(NIL, classname, "building_camera");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -792,7 +792,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_teleporter > 0)
|
||||
{
|
||||
tg = find(world, classname, "building_teleporter");
|
||||
tg = find(NIL, classname, "building_teleporter");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -811,7 +811,7 @@ if (!invis_only)
|
|||
}
|
||||
if (self.has_fieldgen > 0)
|
||||
{
|
||||
tg = find(world, classname, "building_fieldgen");
|
||||
tg = find(NIL, classname, "building_fieldgen");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -836,7 +836,7 @@ if (!invis_only)
|
|||
sprint (self, PRINT_HIGH, ac);
|
||||
sprint (self, PRINT_HIGH, " summoned: ");
|
||||
|
||||
tg = find(world, classname, "monster_demon1");
|
||||
tg = find(NIL, classname, "monster_demon1");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -849,7 +849,7 @@ if (!invis_only)
|
|||
tg = find(tg, classname, "monster_demon1");
|
||||
}
|
||||
|
||||
tg = find(world, classname, "monster_army");
|
||||
tg = find(NIL, classname, "monster_army");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -862,7 +862,7 @@ if (!invis_only)
|
|||
tg = find(tg, classname, "monster_army");
|
||||
}
|
||||
|
||||
tg = find(world, classname, "monster_shambler");
|
||||
tg = find(NIL, classname, "monster_shambler");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -875,7 +875,7 @@ if (!invis_only)
|
|||
tg = find(tg, classname, "monster_shambler");
|
||||
}
|
||||
|
||||
tg = find(world, classname, "monster_wizard");
|
||||
tg = find(NIL, classname, "monster_wizard");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.real_owner == self)
|
||||
|
@ -931,7 +931,7 @@ if (!invis_only)
|
|||
|
||||
if (self.aura) //- OfN - If we have an aura it should tell
|
||||
{
|
||||
if (self.crusader_inspirator != world && !(self.crusader_inspirator.has_disconnected) && self.crusader_inspirator.classname == "player")
|
||||
if (self.crusader_inspirator && !(self.crusader_inspirator.has_disconnected) && self.crusader_inspirator.classname == "player")
|
||||
{
|
||||
sprint(self,PRINT_HIGH,"\n");
|
||||
sprint(self,PRINT_HIGH,self.crusader_inspirator.netname);
|
||||
|
@ -1575,8 +1575,8 @@ void(entity p) TeamFortress_SetSpeed =
|
|||
|
||||
// 2nd, see if any GoalItems are slowing them down
|
||||
tf = 0;
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
while ((te != world) && (tf == 0)) {
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while ((te) && (tf == 0)) {
|
||||
if (te.owner == p) {
|
||||
if (te.goal_activation & TFGI_SLOW) {
|
||||
tf = 1;
|
||||
|
@ -1929,7 +1929,7 @@ void() TeamFortress_SetEquipment =
|
|||
self.items = self.items | kept_items;
|
||||
|
||||
// Start the Cheat-Checking Cyclic Event if CheatChecking Toggleflag is on
|
||||
if (!stof(infokey(world,"nospeed")) && (toggleflags&TFLAG_CHEATCHECK))
|
||||
if (!stof(infokey(NIL,"nospeed")) && (toggleflags&TFLAG_CHEATCHECK))
|
||||
{
|
||||
te = spawn(); //Cyto
|
||||
te.nextthink = time + 2;
|
||||
|
@ -2686,7 +2686,7 @@ void() TeamFortress_RemoveTimers =
|
|||
self.leg_damage = 0;
|
||||
self.is_undercover = 0;
|
||||
self.is_building = 0;
|
||||
self.building = world;
|
||||
self.building = NIL;
|
||||
|
||||
//CH
|
||||
stuffcmd (self, "throwgren\n"); //Throw any grenades
|
||||
|
@ -2701,8 +2701,8 @@ void() TeamFortress_RemoveTimers =
|
|||
}
|
||||
|
||||
// Remove all the timer entities for this player
|
||||
te = find(world, classname, "timer");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "timer");
|
||||
while (te)
|
||||
{
|
||||
//WK Judokatimer is a little weird
|
||||
if (te.netname == "judokatimer" && te.think == JudokaRearm)
|
||||
|
@ -2727,7 +2727,7 @@ 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(world, classname, "timer");
|
||||
te = find(NIL, classname, "timer");
|
||||
}
|
||||
//WK Support for the curse timer
|
||||
else if (te.netname == "bastardtimer")
|
||||
|
@ -2735,7 +2735,7 @@ void() TeamFortress_RemoveTimers =
|
|||
if (self.has_disconnected == TRUE)
|
||||
{
|
||||
dremove(te);
|
||||
te = find(world, classname, "timer");
|
||||
te = find(NIL, classname, "timer");
|
||||
}
|
||||
else
|
||||
te = find(te, classname, "timer");
|
||||
|
@ -2743,7 +2743,7 @@ void() TeamFortress_RemoveTimers =
|
|||
else
|
||||
{
|
||||
dremove(te);
|
||||
te = find(world, classname, "timer");
|
||||
te = find(NIL, classname, "timer");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2751,7 +2751,7 @@ void() TeamFortress_RemoveTimers =
|
|||
}
|
||||
|
||||
// Drop any GoalItems
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.owner == self)
|
||||
|
@ -2779,7 +2779,7 @@ void() TeamFortress_RemoveTimers =
|
|||
}
|
||||
|
||||
// Reset detpacks being disarmed to not being disarmed
|
||||
te = find (world, classname, "detpack");
|
||||
te = find (NIL, classname, "detpack");
|
||||
while (te)
|
||||
{
|
||||
if ((te.weaponmode == 1) && (te.enemy == self))
|
||||
|
@ -2922,7 +2922,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, world, world, (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);
|
||||
|
||||
|
@ -3244,10 +3244,10 @@ void(float tno) RemoveOldAmmobox =
|
|||
index = num_world_ammoboxes - MAX_WORLD_AMMOBOXES;
|
||||
}
|
||||
|
||||
old = find(world, classname, "ammobox");
|
||||
old = find(NIL, classname, "ammobox");
|
||||
while (index > 0)
|
||||
{
|
||||
if (old == world)
|
||||
if (!old)
|
||||
{
|
||||
// RPrint("*** ERROR: RemoveOldAmmobox. ***\n");
|
||||
// RPrint("*** Shaka thought he fixed this ***\n");
|
||||
|
@ -3531,7 +3531,7 @@ void() NormalGrenadeTouch =
|
|||
void() NormalGrenadeExplode =
|
||||
{
|
||||
deathmsg = DMSG_GREN_HAND;
|
||||
T_RadiusDamage (self, self.owner, 180, world);
|
||||
T_RadiusDamage (self, self.owner, 180, NIL);
|
||||
|
||||
#ifdef DEMO_STUFF
|
||||
// Remove any camera's locks on this missile
|
||||
|
@ -3554,7 +3554,7 @@ void() TeamFortress_DisplayDetectionItems =
|
|||
{
|
||||
local entity Goal, te;
|
||||
|
||||
Goal = find(world, classname, "info_tfdetect");
|
||||
Goal = find(NIL, classname, "info_tfdetect");
|
||||
if (!Goal)
|
||||
return;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void() TeamFortress_MOTD =
|
|||
if (self.motd == MOTD_FINISHED - 1)
|
||||
{
|
||||
//WK CHECK TO SEE IF WE ARE REDIRECTING PLAYERS
|
||||
st = infokey(world, "redir");
|
||||
st = infokey(NIL, "redir");
|
||||
if (st && st != "off") {
|
||||
stuffcmd(self,"connect ");
|
||||
stuffcmd(self,st);
|
||||
|
@ -158,7 +158,7 @@ void() PrintMOTD =
|
|||
intro = intro + MSG_INTROBAR;
|
||||
intro = intro + MSG_INTRO3;
|
||||
}
|
||||
infostring = infokey (world, "motd");
|
||||
infostring = infokey (NIL, "motd");
|
||||
if (infostring != "") {
|
||||
if (intro != "")
|
||||
intro = intro + MSG_INTROBAR;
|
||||
|
@ -176,7 +176,7 @@ void() TeamFortress_HelpMap =
|
|||
{
|
||||
local entity te;
|
||||
|
||||
te = find(world, classname, "info_tfdetect");
|
||||
te = find(NIL, classname, "info_tfdetect");
|
||||
if (te)
|
||||
{
|
||||
if (te.non_team_broadcast)
|
||||
|
|
132
tfortmap.qc
132
tfortmap.qc
|
@ -641,7 +641,7 @@ entity(float ino) Finditem =
|
|||
local string st;
|
||||
|
||||
// Look for the goal
|
||||
tg = find (world, classname, "item_tfgoal");
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.goal_no == ino)
|
||||
|
@ -665,7 +665,7 @@ entity(float gno) Findgoal =
|
|||
local string st;
|
||||
|
||||
// Look for the goal
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.goal_no == gno)
|
||||
|
@ -691,7 +691,7 @@ entity(float gno) Findteamspawn =
|
|||
local string st;
|
||||
|
||||
// Look for the goal
|
||||
tg = find (world, classname, "info_player_teamspawn");
|
||||
tg = find (NIL, classname, "info_player_teamspawn");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.goal_no == gno)
|
||||
|
@ -1075,7 +1075,7 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results =
|
|||
}
|
||||
#endif
|
||||
|
||||
if (Goal.goal_result & TFGR_CAUSERESPAWN && Player != world)
|
||||
if (Goal.goal_result & TFGR_CAUSERESPAWN && Player)
|
||||
{
|
||||
if ((Player.playerclass == PC_CUSTOM && Player.done_custom & CUSTOM_FINISHED) || (Player.playerclass != PC_UNDEFINED && Player.playerclass != PC_CUSTOM)) //CH respawn player
|
||||
{
|
||||
|
@ -1128,7 +1128,7 @@ void(entity Goal, entity Player, entity AP, float addb) Apply_Results =
|
|||
if (Goal.remove_item_group != 0)
|
||||
{
|
||||
// Find all goals
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.group_no == Goal.remove_item_group && te.owner == AP)
|
||||
|
@ -1232,7 +1232,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 (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if ((te.owner == Player) && (te != Goal))
|
||||
|
@ -1311,7 +1311,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
RPrint(Goal.netname);
|
||||
#endif
|
||||
|
||||
if (AP != world)
|
||||
if (AP)
|
||||
{
|
||||
#ifdef MAP_DEBUG
|
||||
#ifdef VERBOSE
|
||||
|
@ -1381,7 +1381,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
|
||||
#ifdef MAP_DEBUG
|
||||
#ifdef VERBOSE
|
||||
if (AP != world)
|
||||
if (AP)
|
||||
RPrint("passed.\n Checking Goal States...");
|
||||
else
|
||||
RPrint("\nChecking Goal States...");
|
||||
|
@ -1424,7 +1424,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
if (Goal.if_group_is_active)
|
||||
{
|
||||
// Find all goals in the group
|
||||
te = find (world, classname, "info_tfgoal");
|
||||
te = find (NIL, classname, "info_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.group_no == Goal.if_group_is_active)
|
||||
|
@ -1440,7 +1440,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
if (Goal.if_group_is_inactive)
|
||||
{
|
||||
// Find all goals in the group
|
||||
te = find (world, classname, "info_tfgoal");
|
||||
te = find (NIL, classname, "info_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.group_no == Goal.if_group_is_inactive)
|
||||
|
@ -1456,7 +1456,7 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
if (Goal.if_group_is_removed)
|
||||
{
|
||||
// Find all goals in the group
|
||||
te = find (world, classname, "info_tfgoal");
|
||||
te = find (NIL, classname, "info_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.group_no == Goal.if_group_is_removed)
|
||||
|
@ -1507,14 +1507,14 @@ float(entity Goal, entity AP) APMeetsCriteria =
|
|||
#endif
|
||||
#endif
|
||||
|
||||
if (AP != world)
|
||||
if (AP)
|
||||
{
|
||||
gotone = FALSE;
|
||||
if (Goal.has_item_from_group)
|
||||
{
|
||||
// Find all goals
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
while (te != world && !gotone)
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te && !gotone)
|
||||
{
|
||||
if (te.group_no == Goal.has_item_from_group && te.owner == AP)
|
||||
gotone = TRUE;
|
||||
|
@ -1700,7 +1700,7 @@ void(entity Goal, entity AP, entity ActivatingGoal) AttemptToActivate =
|
|||
// It's all cool. Do the Results.
|
||||
if (ActivatingGoal == Goal)
|
||||
DoResults(Goal, AP, TRUE);
|
||||
else if (ActivatingGoal != world)
|
||||
else if (ActivatingGoal)
|
||||
DoResults(Goal, AP, (ActivatingGoal.goal_result & TFGR_ADD_BONUSES));
|
||||
else
|
||||
DoResults(Goal, AP, 0);
|
||||
|
@ -1842,7 +1842,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
|
||||
allset = 1;
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.all_active)
|
||||
|
@ -1883,7 +1883,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.activate_group_no != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.activate_group_no)
|
||||
|
@ -1897,7 +1897,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.inactivate_group_no != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.inactivate_group_no)
|
||||
|
@ -1911,7 +1911,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.remove_group_no != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.remove_group_no)
|
||||
|
@ -1925,7 +1925,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.restore_group_no != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_tfgoal");
|
||||
tg = find (NIL, classname, "info_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.restore_group_no)
|
||||
|
@ -1939,7 +1939,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.remove_spawngroup != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_player_teamspawn");
|
||||
tg = find (NIL, classname, "info_player_teamspawn");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.remove_spawngroup)
|
||||
|
@ -1955,7 +1955,7 @@ void(entity Goal, entity AP) DoGroupWork =
|
|||
if (Goal.restore_spawngroup != 0)
|
||||
{
|
||||
// Find all goals
|
||||
tg = find (world, classname, "info_player_teamspawn");
|
||||
tg = find (NIL, classname, "info_player_teamspawn");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Goal.restore_spawngroup)
|
||||
|
@ -1997,7 +1997,7 @@ void(entity Item, entity AP) DoItemGroupWork =
|
|||
}
|
||||
|
||||
// Find all goals
|
||||
tg = find (world, classname, "item_tfgoal");
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Item.distance)
|
||||
|
@ -2029,16 +2029,16 @@ void(entity Item, entity AP) DoItemGroupWork =
|
|||
RPrint(" has a .speed specified, but no .attack_finished\n");
|
||||
}
|
||||
|
||||
carrier = world;
|
||||
carrier = NIL;
|
||||
// Find all goals
|
||||
tg = find (world, classname, "item_tfgoal");
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.group_no == Item.speed)
|
||||
{
|
||||
if (tg.goal_state != TFGS_ACTIVE)
|
||||
allcarried = FALSE;
|
||||
else if (carrier == world)
|
||||
else if (!carrier)
|
||||
carrier = tg.owner;
|
||||
else if (carrier != tg.owner)
|
||||
allcarried = FALSE;
|
||||
|
@ -2074,15 +2074,15 @@ void(entity Goal, entity AP) DoTriggerWork =
|
|||
// remove targets
|
||||
if (Goal.killtarget)
|
||||
{
|
||||
t = world;
|
||||
t = NIL;
|
||||
do
|
||||
{
|
||||
t = find(t, targetname, Goal.killtarget);
|
||||
|
||||
if (t != world && t != Goal)
|
||||
if (t && t != Goal)
|
||||
remove(t);
|
||||
|
||||
} while ( t != world );
|
||||
} while ( t );
|
||||
}
|
||||
|
||||
#ifdef MAP_DEBUG
|
||||
|
@ -2097,12 +2097,12 @@ void(entity Goal, entity AP) DoTriggerWork =
|
|||
// fire targets
|
||||
if (Goal.target)
|
||||
{
|
||||
t = world;
|
||||
t = NIL;
|
||||
activator = AP;
|
||||
do
|
||||
{
|
||||
t = find (t, targetname, Goal.target);
|
||||
if (t == world)
|
||||
if (!t)
|
||||
return;
|
||||
stemp = self;
|
||||
otemp = other;
|
||||
|
@ -2113,7 +2113,7 @@ void(entity Goal, entity AP) DoTriggerWork =
|
|||
self = stemp;
|
||||
other = otemp;
|
||||
activator = AP;
|
||||
} while ( t != world );
|
||||
} while ( t );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2239,12 +2239,12 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
// CTF Map support
|
||||
if (CTF_Map == TRUE)
|
||||
{
|
||||
if (AP != world)
|
||||
if (AP)
|
||||
{
|
||||
if (Goal.goal_no == CTF_FLAG1)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 2)
|
||||
{
|
||||
|
@ -2281,8 +2281,8 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
}
|
||||
else if (Goal.goal_no == CTF_FLAG2)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 1)
|
||||
{
|
||||
|
@ -2318,8 +2318,8 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
}
|
||||
else if (Goal.goal_no == CTF_DROPOFF1)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 2)
|
||||
{
|
||||
|
@ -2340,8 +2340,8 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
}
|
||||
else if (Goal.goal_no == CTF_DROPOFF2)
|
||||
{
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 1)
|
||||
{
|
||||
|
@ -2363,8 +2363,8 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
}
|
||||
|
||||
// Go through all the players and do any results
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
// Centerprinting
|
||||
if (Goal.broadcast && CTF_Map == FALSE)
|
||||
|
@ -2447,7 +2447,7 @@ void(entity Goal, entity AP, float addb) DoResults =
|
|||
winners = TeamFortress_TeamGetWinner();
|
||||
|
||||
// Stop everyone
|
||||
te = find (world, classname, "player");
|
||||
te = find (NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
te.takedamage = 0;
|
||||
|
@ -2604,9 +2604,9 @@ void() tfgoal_timer_tick =
|
|||
RPrint(" Checking criteria...");
|
||||
#endif
|
||||
|
||||
if (APMeetsCriteria(self, world))
|
||||
if (APMeetsCriteria(self, NIL))
|
||||
{
|
||||
DoResults(self, world, TRUE);
|
||||
DoResults(self, NIL, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2624,7 +2624,7 @@ void() tfgoal_timer_tick =
|
|||
// Touch function for the goalitem entity
|
||||
void() item_tfgoal_touch =
|
||||
{
|
||||
if (infokey(world,"ceasefire")=="on") //OfN
|
||||
if (infokey(NIL,"ceasefire")=="on") //OfN
|
||||
return;
|
||||
|
||||
local entity te;
|
||||
|
@ -2657,8 +2657,8 @@ void() item_tfgoal_touch =
|
|||
bprint(PRINT_HIGH, other.netname);
|
||||
bprint(PRINT_HIGH, " ÒÅÔÕÒÎÅÄ the ÂÌÕÅ flag!\n");
|
||||
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 1)
|
||||
CenterPrint2(te, "\n\n\n", "Your flag was ÒÅÔÕÒÎÅÄ!!");
|
||||
|
@ -2694,8 +2694,8 @@ void() item_tfgoal_touch =
|
|||
bprint(PRINT_HIGH, other.netname);
|
||||
bprint(PRINT_HIGH, " ÒÅÔÕÒÎÅÄ the ÒÅÄ flag!\n");
|
||||
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == 2)
|
||||
CenterPrint(te, "\n\n\n Your flag was ÒÅÔÕÒÎÅÄ!!");
|
||||
|
@ -2902,9 +2902,9 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
local float spyoff;
|
||||
local entity DelayReturn;
|
||||
|
||||
if (Item == world)
|
||||
if (!Item)
|
||||
{
|
||||
RPrint("error: tfgoalitem_RemoveFromPlayer(): Item == world");
|
||||
RPrint("error: tfgoalitem_RemoveFromPlayer(): !Item");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2923,7 +2923,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
spyoff = FALSE;
|
||||
// Remove the deeds from the player
|
||||
// Make sure we don't remove an effect another Goal is also supplying
|
||||
te = find (world, classname, "item_tfgoal");
|
||||
te = find (NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if ((te.owner == AP) && (te != Item))
|
||||
|
@ -2969,8 +2969,8 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
|
||||
// Remove AP Modifications
|
||||
// Go through all the players and do any results
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (IsAffectedBy(Item, te, AP))
|
||||
{
|
||||
|
@ -2991,8 +2991,8 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
if (method == 0) // Dropped by a dying player
|
||||
{
|
||||
// Do messages
|
||||
te = find(world, classname, "player");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == Item.owned_by)
|
||||
{
|
||||
|
@ -3041,12 +3041,12 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
else
|
||||
{
|
||||
// Remove the Item
|
||||
Item.owner = world;
|
||||
Item.owner = NIL;
|
||||
dremove(Item);
|
||||
TeamFortress_SetSpeed(AP);
|
||||
return;
|
||||
}
|
||||
Item.owner = world;
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
return;
|
||||
}
|
||||
|
@ -3083,14 +3083,14 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer =
|
|||
tfgoalitem_checkgoalreturn(Item);
|
||||
*/
|
||||
|
||||
Item.owner = world;
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't remove it, since it may be given away again later
|
||||
Item.solid = SOLID_NOT;
|
||||
Item.owner = world;
|
||||
Item.owner = NIL;
|
||||
TeamFortress_SetSpeed(AP);
|
||||
return;
|
||||
}
|
||||
|
@ -3291,7 +3291,7 @@ void() tfgoalitem_remove =
|
|||
// Do we need to do any CenterPrint2ing?
|
||||
if (self.noise3 || self.noise4)
|
||||
{
|
||||
te = find (world, classname, "player");
|
||||
te = find (NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (te.team_no == self.owned_by)
|
||||
|
@ -3367,7 +3367,7 @@ void(entity Item) tfgoalitem_checkgoalreturn =
|
|||
{
|
||||
te = Findgoal(Item.impulse);
|
||||
if (te)
|
||||
AttemptToActivate(te, world, Item);
|
||||
AttemptToActivate(te, NIL, Item);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3593,8 +3593,8 @@ void() CTF_FlagCheck =
|
|||
local float flagcount, pos;
|
||||
|
||||
flagcount = 0;
|
||||
te = find(world, classname, "item_tfgoal");
|
||||
while (te != world)
|
||||
te = find(NIL, classname, "item_tfgoal");
|
||||
while (te)
|
||||
{
|
||||
if (te.goal_no == CTF_FLAG1)
|
||||
{
|
||||
|
|
28
tforttm.qc
28
tforttm.qc
|
@ -129,9 +129,9 @@ string(float tno) GetTeamName =
|
|||
return world.b_b;
|
||||
}*/
|
||||
|
||||
st = infokey(world, "team1");
|
||||
st = infokey(NIL, "team1");
|
||||
if (!st)
|
||||
st = infokey(world, "t1");
|
||||
st = infokey(NIL, "t1");
|
||||
|
||||
if (!st || st == "")
|
||||
return "blue";
|
||||
|
@ -143,9 +143,9 @@ string(float tno) GetTeamName =
|
|||
return world.b_t;
|
||||
}*/
|
||||
|
||||
st = infokey(world, "team2");
|
||||
st = infokey(NIL, "team2");
|
||||
if (!st)
|
||||
st = infokey(world, "t2");
|
||||
st = infokey(NIL, "t2");
|
||||
|
||||
if (!st)
|
||||
return "red";
|
||||
|
@ -157,9 +157,9 @@ string(float tno) GetTeamName =
|
|||
return world.b_n;
|
||||
}*/
|
||||
|
||||
st = infokey(world, "team3");
|
||||
st = infokey(NIL, "team3");
|
||||
if (!st)
|
||||
st = infokey(world, "t3");
|
||||
st = infokey(NIL, "t3");
|
||||
|
||||
if (!st)
|
||||
return "yell";
|
||||
|
@ -171,9 +171,9 @@ string(float tno) GetTeamName =
|
|||
return world.b_o;
|
||||
}*/
|
||||
|
||||
st = infokey(world, "team4");
|
||||
st = infokey(NIL, "team4");
|
||||
if (!st)
|
||||
st = infokey(world, "t4");
|
||||
st = infokey(NIL, "t4");
|
||||
|
||||
if (!st)
|
||||
return "teal";
|
||||
|
@ -612,7 +612,7 @@ void(float tno, float scoretoadd) TeamFortress_TeamIncreaseScore =
|
|||
// If TeamFrags is on, update all the team's player's frags.
|
||||
if (toggleflags & TFLAG_TEAMFRAGS)
|
||||
{
|
||||
e = find(world, classname, "player");
|
||||
e = find(NIL, classname, "player");
|
||||
while (e)
|
||||
{
|
||||
if (e.team_no == tno)
|
||||
|
@ -662,8 +662,8 @@ float (float tno) TeamFortress_TeamGetNoPlayers =
|
|||
local entity search;
|
||||
//local string st;
|
||||
|
||||
search = find (world, classname, "player");
|
||||
while (search != world)
|
||||
search = find (NIL, classname, "player");
|
||||
while (search)
|
||||
{
|
||||
if (search.team_no == tno)
|
||||
size_team = size_team + 1;
|
||||
|
@ -860,14 +860,14 @@ string(float tno) TeamFortress_TeamGetColorString =
|
|||
void(entity Player) TeamFortress_TeamShowMemberClasses =
|
||||
{
|
||||
/*local string st;
|
||||
st = infokey(world, "no_showmembers"); */
|
||||
st = infokey(NIL, "no_showmembers"); */
|
||||
|
||||
local entity e;
|
||||
local float found;
|
||||
|
||||
found = FALSE;
|
||||
|
||||
e = find(world, classname, "player");
|
||||
e = find(NIL, classname, "player");
|
||||
while (e)
|
||||
{
|
||||
if (((e.team_no == Player.team_no) || (e.team_no == 0)) && (e != Player))
|
||||
|
@ -1235,7 +1235,7 @@ void(float tno, entity ignore, string st) teamsprint =
|
|||
|
||||
local entity te;
|
||||
|
||||
te = find(world, classname, "player");
|
||||
te = find(NIL, classname, "player");
|
||||
while (te)
|
||||
{
|
||||
if (Teammate(te.team_no,tno) && te != ignore)
|
||||
|
|
|
@ -7,7 +7,7 @@ void () BadTinker = {
|
|||
sprint(self,PRINT_HIGH,"Nothing happened.\n");
|
||||
}
|
||||
else if (prob <= 0.8){ // Zowie!
|
||||
TF_T_Damage(self.building, world, world, 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!
|
||||
|
|
|
@ -453,7 +453,7 @@ void() teleport_touch =
|
|||
// put a tfog where the player was
|
||||
spawn_tfog (other.origin);
|
||||
|
||||
t = find (world, targetname, self.target);
|
||||
t = find (NIL, targetname, self.target);
|
||||
if (!t)
|
||||
objerror ("couldn't find target");
|
||||
|
||||
|
|
76
warlock.qc
76
warlock.qc
|
@ -29,7 +29,7 @@ void() Menu_Demon =
|
|||
//if (self.job & JOB_BLOODY_KNIFE)
|
||||
// st2="ÛÂÌÏÏÄÝ";
|
||||
|
||||
if (self.demon_one!=world)
|
||||
if (self.demon_one)
|
||||
{
|
||||
custom_demon_name(self.demon_one);
|
||||
st=GetMonsterName(self.demon_one);
|
||||
|
@ -131,14 +131,14 @@ void(float inp) Menu_Demon_Input =
|
|||
self.impulse = 0;
|
||||
return;
|
||||
}
|
||||
if (inp == 1 && self.demon_one != world) // Come here!
|
||||
if (inp == 1 && self.demon_one) // Come here!
|
||||
{
|
||||
if (!IsMonster(self.demon_one)) return;
|
||||
|
||||
local string st;
|
||||
st=GetMonsterName(self.demon_one);
|
||||
|
||||
if (self.demon_one.enemy != world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ void(float inp) Menu_Demon_Input =
|
|||
return;
|
||||
}
|
||||
|
||||
self.demon_one.enemy=world;//
|
||||
self.demon_one.enemy=NIL;//
|
||||
self.demon_one.goalentity=self;
|
||||
self.demon_one.nextthink=time+0.1;
|
||||
|
||||
|
@ -172,14 +172,14 @@ void(float inp) Menu_Demon_Input =
|
|||
self.impulse=0;
|
||||
return;
|
||||
}
|
||||
else if (inp == 2 && self.demon_one != world) // patrol
|
||||
else if (inp == 2 && self.demon_one) // patrol
|
||||
{
|
||||
if (!IsMonster(self.demon_one)) return;
|
||||
|
||||
local string st;
|
||||
st=GetMonsterName(self.demon_one);
|
||||
|
||||
if (self.demon_one.enemy != world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -190,8 +190,8 @@ void(float inp) Menu_Demon_Input =
|
|||
return;
|
||||
}
|
||||
}
|
||||
self.demon_one.enemy=world;//
|
||||
self.demon_one.oldenemy=world;////
|
||||
self.demon_one.enemy=NIL;//
|
||||
self.demon_one.oldenemy=NIL;////
|
||||
self.demon_one.goalentity=self.demon_one;
|
||||
self.demon_one.nextthink=time+0.1;
|
||||
|
||||
|
@ -205,14 +205,14 @@ void(float inp) Menu_Demon_Input =
|
|||
self.impulse=0;
|
||||
return;
|
||||
}
|
||||
else if (inp == 3 && self.demon_one != world) // stop there!
|
||||
else if (inp == 3 && self.demon_one) // stop there!
|
||||
{
|
||||
if (!IsMonster(self.demon_one)) return;
|
||||
|
||||
local string st;
|
||||
st=GetMonsterName(self.demon_one);
|
||||
|
||||
if (self.demon_one.enemy != world)
|
||||
if (self.demon_one.enemy)
|
||||
{
|
||||
if (visible2(self.demon_one,self.demon_one.enemy))
|
||||
{
|
||||
|
@ -223,9 +223,9 @@ void(float inp) Menu_Demon_Input =
|
|||
return;
|
||||
}
|
||||
}
|
||||
self.demon_one.enemy=world;//
|
||||
self.demon_one.oldenemy=world;////
|
||||
self.demon_one.goalentity=world;
|
||||
self.demon_one.enemy=NIL;//
|
||||
self.demon_one.oldenemy=NIL;////
|
||||
self.demon_one.goalentity=NIL;
|
||||
self.demon_one.nextthink=time+0.1;
|
||||
|
||||
PutMonsterStand(self.demon_one);
|
||||
|
@ -919,7 +919,7 @@ void () kill_my_demon =
|
|||
local entity te;
|
||||
local entity oself;
|
||||
//WK Clean up demons
|
||||
te = find(world, classname, "monster_demon1");
|
||||
te = find(NIL, classname, "monster_demon1");
|
||||
while (te)
|
||||
{
|
||||
if (te.real_owner == self) {
|
||||
|
@ -945,7 +945,7 @@ void () kill_my_demon =
|
|||
te = find(te, classname, "monster_demon1");
|
||||
}
|
||||
|
||||
te = find(world, classname, "monster_army");
|
||||
te = find(NIL, classname, "monster_army");
|
||||
|
||||
while (te)
|
||||
{
|
||||
|
@ -974,18 +974,18 @@ void () kill_my_demon =
|
|||
//--------------------------//
|
||||
|
||||
|
||||
/* if (self.martyr_enemy != world)
|
||||
/* if (self.martyr_enemy)
|
||||
dremove(self.martyr_enemy);
|
||||
|
||||
if (self.demon_one != world)
|
||||
if (self.demon_one)
|
||||
dremove(self.demon_one);
|
||||
|
||||
|
||||
if (self.demon_two != world)
|
||||
if (self.demon_two)
|
||||
dremove(self.demon_two);
|
||||
*/
|
||||
|
||||
if (self.martyr_enemy != world)
|
||||
if (self.martyr_enemy)
|
||||
#ifdef ARMY_DEBUG
|
||||
RemoveWaypoint(self.martyr_enemy, "KillMyDemon() martyr", self);
|
||||
#else
|
||||
|
@ -994,7 +994,7 @@ void () kill_my_demon =
|
|||
|
||||
//dremove(self.martyr_enemy);
|
||||
|
||||
if (self.demon_one != world)
|
||||
if (self.demon_one)
|
||||
#ifdef ARMY_DEBUG
|
||||
RemoveWaypoint(self.demon_one, "KillMyDemon() demon_one", self);
|
||||
#else
|
||||
|
@ -1003,7 +1003,7 @@ void () kill_my_demon =
|
|||
|
||||
//dremove(self.demon_one);
|
||||
|
||||
if (self.demon_two != world)
|
||||
if (self.demon_two)
|
||||
|
||||
#ifdef ARMY_DEBUG
|
||||
RemoveWaypoint(self.demon_two, "KillMyDemon() demon_two", self);
|
||||
|
@ -1018,15 +1018,15 @@ void () kill_my_demon =
|
|||
sprint (self, PRINT_HIGH, "Your soldier is dead.\n");
|
||||
self.job = self.job - (self.job & JOB_DEMON_OUT);
|
||||
|
||||
self.demon_one = world;
|
||||
self.demon_one = NIL;
|
||||
SetArmyTimer();
|
||||
//TF_T_Damage(te, world, world, 4000, 0, 0);
|
||||
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
|
||||
}
|
||||
|
||||
te = find(te, classname, "monster_army");
|
||||
}
|
||||
|
||||
/*te = find(world, classname, "monster_knight");
|
||||
/*te = find(NIL, classname, "monster_knight");
|
||||
|
||||
while (te)
|
||||
{
|
||||
|
@ -1048,12 +1048,12 @@ void () kill_my_demon =
|
|||
|
||||
//self.job = self.job - (self.job & JOB_DEMON_OUT);
|
||||
sprint (self, PRINT_HIGH, "Your knight is dead.\n");
|
||||
//TF_T_Damage(te, world, world, 4000, 0, 0);
|
||||
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
|
||||
}
|
||||
te = find(te, classname, "monster_knight");
|
||||
}
|
||||
|
||||
te = find(world, classname, "monster_hknight");
|
||||
te = find(NIL, classname, "monster_hknight");
|
||||
|
||||
while (te)
|
||||
{
|
||||
|
@ -1073,12 +1073,12 @@ void () kill_my_demon =
|
|||
|
||||
//self.job = self.job - (self.job & JOB_DEMON_OUT);
|
||||
sprint (self, PRINT_HIGH, "Your hell knight is dead.\n");
|
||||
//TF_T_Damage(te, world, world, 4000, 0, 0);
|
||||
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
|
||||
}
|
||||
te = find(te, classname, "monster_hknight");
|
||||
}*/
|
||||
|
||||
te = find(world, classname, "monster_shambler");
|
||||
te = find(NIL, classname, "monster_shambler");
|
||||
|
||||
while (te)
|
||||
{
|
||||
|
@ -1098,13 +1098,13 @@ void () kill_my_demon =
|
|||
|
||||
//self.job = self.job - (self.job & JOB_DEMON_OUT);
|
||||
sprint (self, PRINT_HIGH, "Your shambler is dead.\n");
|
||||
//TF_T_Damage(te, world, world, 4000, 0, 0);
|
||||
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
|
||||
}
|
||||
te = find(te, classname, "monster_shambler");
|
||||
}
|
||||
|
||||
|
||||
te = find(world, classname, "monster_wizard");
|
||||
te = find(NIL, classname, "monster_wizard");
|
||||
|
||||
while (te)
|
||||
{
|
||||
|
@ -1124,16 +1124,16 @@ void () kill_my_demon =
|
|||
|
||||
|
||||
sprint (self, PRINT_HIGH, "Your scrag is dead.\n");
|
||||
//TF_T_Damage(te, world, world, 4000, 0, 0);
|
||||
//TF_T_Damage(te, NIL, NIL, 4000, 0, 0);
|
||||
}
|
||||
te = find(te, classname, "monster_wizard");
|
||||
}
|
||||
|
||||
self.job = self.job - (self.job & JOB_DEMON_OUT);
|
||||
self.demon_one = world;
|
||||
self.demon_one = NIL;
|
||||
|
||||
self.summon_one = world;
|
||||
self.summon_two = world;
|
||||
self.summon_one = NIL;
|
||||
self.summon_two = NIL;
|
||||
};
|
||||
|
||||
void() MonsterTouch =
|
||||
|
@ -1199,7 +1199,7 @@ void (entity player) UpdateSummons =
|
|||
}
|
||||
|
||||
// Update our first summon
|
||||
if (player.summon_one != world)
|
||||
if (player.summon_one)
|
||||
{
|
||||
if (!IsMonster(player.summon_one))
|
||||
{
|
||||
|
@ -1208,11 +1208,11 @@ void (entity player) UpdateSummons =
|
|||
}
|
||||
|
||||
if (player.summon_one.has_holo == 0) // set to 0 on die thinks
|
||||
player.summon_one = world;
|
||||
player.summon_one = NIL;
|
||||
}
|
||||
|
||||
// Update our second summon
|
||||
if (player.summon_two != world)
|
||||
if (player.summon_two)
|
||||
{
|
||||
if (!IsMonster(player.summon_two))
|
||||
{
|
||||
|
@ -1221,7 +1221,7 @@ void (entity player) UpdateSummons =
|
|||
}
|
||||
|
||||
if (player.summon_two.has_holo == 0) // set to 0 on die thinks
|
||||
player.summon_two = world;
|
||||
player.summon_two = NIL;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
48
weapons.qc
48
weapons.qc
|
@ -591,13 +591,13 @@ void(float inAuto) W_FireMedikit =
|
|||
|
||||
// remove concussion from player
|
||||
// Try to find a concusstimer entity for this player
|
||||
te = find(world, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != ConcussionGrenadeTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != ConcussionGrenadeTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
stuffcmd(trace_ent ,"v_idlescale 0\n");
|
||||
SpawnBlood(org, 20);
|
||||
|
@ -618,13 +618,13 @@ void(float inAuto) W_FireMedikit =
|
|||
// Try to find a hallucination timer entity for this player
|
||||
if (trace_ent.tfstate & TFSTATE_HALLUCINATING)
|
||||
{
|
||||
te = find(world, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != HallucinationTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != HallucinationTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
trace_ent.tfstate = trace_ent.tfstate - (trace_ent.tfstate & TFSTATE_HALLUCINATING);
|
||||
|
||||
|
@ -651,13 +651,13 @@ void(float inAuto) W_FireMedikit =
|
|||
// Try to find a tranquilisation timer entity for this player
|
||||
if (trace_ent.tfstate & TFSTATE_TRANQUILISED)
|
||||
{
|
||||
te = find(world, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != TranquiliserTimer)) && (te != world))
|
||||
te = find(NIL, classname, "timer");
|
||||
while (((te.owner != trace_ent) || (te.think != TranquiliserTimer)) && (te))
|
||||
{
|
||||
te = find(te, classname, "timer");
|
||||
}
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
trace_ent.tfstate = trace_ent.tfstate - (trace_ent.tfstate & TFSTATE_TRANQUILISED);
|
||||
TeamFortress_SetSpeed(trace_ent);
|
||||
|
@ -684,11 +684,11 @@ void(float inAuto) W_FireMedikit =
|
|||
// check if the healed player is blinded
|
||||
if (trace_ent.FlashTime > 0)
|
||||
{
|
||||
te = find(world, netname, "flashtimer");
|
||||
while ((te.owner != trace_ent || te.classname != "timer") && (te != world))
|
||||
te = find(NIL, netname, "flashtimer");
|
||||
while ((te.owner != trace_ent || te.classname != "timer") && (te))
|
||||
te = find(te, netname, "flashtimer");
|
||||
|
||||
if (te != world)
|
||||
if (te)
|
||||
{
|
||||
trace_ent.FlashTime = 0;
|
||||
SpawnBlood(org, 20);
|
||||
|
@ -1090,7 +1090,7 @@ float puff_count;
|
|||
|
||||
void() ClearMultiDamage =
|
||||
{
|
||||
multi_ent = world;
|
||||
multi_ent = NIL;
|
||||
multi_damage = 0;
|
||||
blood_count = 0;
|
||||
puff_count = 0;
|
||||
|
@ -1350,7 +1350,7 @@ void() W_FireSniperRifle =
|
|||
traceline (src, src + dir*8092, FALSE, self);
|
||||
if (trace_fraction != 1.0)
|
||||
{
|
||||
if (trace_ent != world)
|
||||
if (trace_ent)
|
||||
{
|
||||
if (trace_ent.classname == "player")
|
||||
{
|
||||
|
@ -1658,15 +1658,15 @@ void() Rocket_Track_Dot =
|
|||
local vector dir, vtemp;
|
||||
local entity tg, sight;
|
||||
|
||||
sight = world;
|
||||
tg = find (world, classname, "timer");
|
||||
sight = NIL;
|
||||
tg = find (NIL, classname, "timer");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.owner == self.owner && tg.think == SniperSight_Update2)
|
||||
sight = tg;
|
||||
tg = find(tg, classname, "timer");
|
||||
}
|
||||
if (sight != world) //Found a sight
|
||||
if (sight) //Found a sight
|
||||
{
|
||||
vtemp = sight.origin;
|
||||
dir = normalize(vtemp - self.origin);
|
||||
|
@ -1847,7 +1847,7 @@ void(vector p1, vector p2, entity from, float damage) LightningDamage =
|
|||
f_z = 0;
|
||||
f = f*16;
|
||||
|
||||
e1 = e2 = world;
|
||||
e1 = e2 = NIL;
|
||||
|
||||
traceline (p1, p2, FALSE, self);
|
||||
|
||||
|
@ -1902,8 +1902,8 @@ void() W_FireLightning =
|
|||
self.ammo_cells = self.ammo_cells - cells;
|
||||
W_SetCurrentAmmo ();
|
||||
deathmsg = DMSG_LIGHTNING;
|
||||
//WK T_RadiusDamage (self, self, 35*cells, world);
|
||||
T_RadiusDamage (self, self, 20*cells, world);
|
||||
//WK T_RadiusDamage (self, self, 35*cells, NIL);
|
||||
T_RadiusDamage (self, self, 20*cells, NIL);
|
||||
Attack_Finished(5);
|
||||
return;
|
||||
}
|
||||
|
@ -2020,10 +2020,10 @@ void(float tno) ExplodeOldPipebomb =
|
|||
index = num_world_pipebombs - MAX_WORLD_PIPEBOMBS;
|
||||
}
|
||||
|
||||
old = find(world, classname, "pipebomb");
|
||||
old = find(NIL, classname, "pipebomb");
|
||||
while (index > 0)
|
||||
{
|
||||
if (old == world)
|
||||
if (!old)
|
||||
{
|
||||
RPrint("*** ERROR: ExplodeOldPipebomb. ***\n");
|
||||
RPrint("*** Please report this. ***\n");
|
||||
|
@ -2081,7 +2081,7 @@ void() GrenadeExplode =
|
|||
}
|
||||
|
||||
deathmsg = self.weapon;
|
||||
T_RadiusDamage (self, self.owner, 120, world);
|
||||
T_RadiusDamage (self, self.owner, 120, NIL);
|
||||
|
||||
#ifdef DEMO_STUFF
|
||||
// Remove any camera's locks on this missile
|
||||
|
@ -4972,7 +4972,7 @@ void() HIP_LaserTouch =
|
|||
local vector oldvel;
|
||||
//local float r;
|
||||
|
||||
self.owner = world;
|
||||
self.owner = NIL;
|
||||
self.cnt = self.cnt + 1;
|
||||
if (pointcontents(self.origin) == CONTENTS_SKY)
|
||||
{
|
||||
|
|
|
@ -361,7 +361,7 @@ void() wiz_die =
|
|||
sprint(self.real_owner,PRINT_HIGH,"Your scrag is dead.\n");
|
||||
self.real_owner.job = self.real_owner.job - (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 = world;
|
||||
self.real_owner.demon_one = NIL;
|
||||
}
|
||||
|
||||
// check for gib
|
||||
|
|
28
world.qc
28
world.qc
|
@ -191,10 +191,10 @@ void() worldspawn =
|
|||
local string st; //WK
|
||||
local entity ticker;
|
||||
|
||||
lastspawn = world;
|
||||
lastspawn = world = self;
|
||||
InitBodyQue ();
|
||||
|
||||
st = infokey(world, "mapcfg");
|
||||
st = infokey(NIL, "mapcfg");
|
||||
if (!(st == "0" || st == "off" || st == ""))
|
||||
{
|
||||
if (st == "1" || st == "on")
|
||||
|
@ -205,12 +205,12 @@ void() worldspawn =
|
|||
localcmd("exec \"");
|
||||
localcmd(st);
|
||||
localcmd("/");
|
||||
localcmd(infokey(world, "map"));
|
||||
localcmd(infokey(NIL, "map"));
|
||||
localcmd(".cfg\"\n");
|
||||
}
|
||||
|
||||
// custom map attributes
|
||||
st = infokey(world, "*gamedir");
|
||||
st = infokey(NIL, "*gamedir");
|
||||
if (st != "fortress")
|
||||
{
|
||||
if (st == "")
|
||||
|
@ -222,28 +222,28 @@ void() worldspawn =
|
|||
|
||||
//- OfteN globals -//
|
||||
UpdateInfos();
|
||||
debug_target=world;
|
||||
debug_target=NIL;
|
||||
already_chosen_map = FALSE;
|
||||
triggered_cycle = FALSE;
|
||||
////////////////////
|
||||
|
||||
if (stof(infokey (world, "edictticker")))
|
||||
if (stof(infokey (NIL, "edictticker")))
|
||||
{
|
||||
ticker = spawn();
|
||||
ticker.classname = "edictcount";
|
||||
ticker.nextthink = time + 5;
|
||||
ticker.think = edictticker_think;
|
||||
ticker.num_mines = stof(infokey (world, "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(world, "chris");
|
||||
/*st = infokey(NIL, "chris");
|
||||
if (st == "on")
|
||||
chris = TRUE;
|
||||
else
|
||||
chris = stof(st);
|
||||
|
||||
st = infokey(world, "roundtime");
|
||||
st = infokey(NIL, "roundtime");
|
||||
roundtime = stof(st);
|
||||
if (!roundtime)
|
||||
roundtime = 300;
|
||||
|
@ -256,13 +256,13 @@ void() worldspawn =
|
|||
|
||||
// We load the masks from the map, overriding it with infokeys if
|
||||
// they exist
|
||||
st = infokey (world, "friends1_mask");
|
||||
st = infokey (NIL, "friends1_mask");
|
||||
friends1_mask = stof (st ? st : self.noise1);
|
||||
st = infokey (world, "friends2_mask");
|
||||
st = infokey (NIL, "friends2_mask");
|
||||
friends2_mask = stof (st ? st : self.noise2);
|
||||
st = infokey (world, "friends3_mask");
|
||||
st = infokey (NIL, "friends3_mask");
|
||||
friends3_mask = stof (st ? st : self.noise3);
|
||||
st = infokey (world, "friends4_mask");
|
||||
st = infokey (NIL, "friends4_mask");
|
||||
friends4_mask = stof (st ? st : self.noise4);
|
||||
|
||||
|
||||
|
@ -562,7 +562,7 @@ void() StartFrame =
|
|||
|
||||
local string timeleft;
|
||||
timeleft = timelimit ? sprintf ("%.0f", (timelimit - time) / 60) : "";
|
||||
if (timeleft != infokey (world, "timeleft"))
|
||||
if (timeleft != infokey (NIL, "timeleft"))
|
||||
localcmd ("serverinfo timeleft " + timeleft + "\n");
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue