void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
// Rail -> Rifle
-void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); }
+void spawnfunc_weapon_railgun() { spawnfunc_weapon_rifle(); }
void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
// BFG -> Crylink
for(targ = world; (targ = find(targ, targetname, trigger.target)); )
if (targ.classname == "target_init" || targ.classname == "target_give" || targ.classname == "target_items")
{
- targ.wait = -2;
+ trigger.wait = 0;
+ trigger.delay = 0;
+ targ.wait = 0;
targ.delay = 0;
- setsize(targ, trigger.mins, trigger.maxs);
- setorigin(targ, trigger.origin);
+ //setsize(targ, trigger.mins, trigger.maxs);
+ //setorigin(targ, trigger.origin);
//remove(trigger);
}
}
void spawnfunc_target_init()
{
self.spawnflags = 0; // remove all weapons except the ones listed below
- self.netname = "laser uzi"; // keep these weapons through the remove trigger
+ self.netname = "shotgun"; // keep these weapons through the remove trigger
spawnfunc_target_items();
InitializeEntity(self, target_init_verify, INITPRIO_FINDTARGET);
}
self.armorvalue = 100;
else if (targ.classname == "item_health_mega")
self.health = 200;
- remove(targ);
+ //remove(targ); // removing ents in init functions causes havoc, workaround:
+ targ.think = SUB_Remove;
+ targ.nextthink = time;
}
self.spawnflags = 2;
spawnfunc_target_items();
void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); }
void spawnfunc_item_flight() { spawnfunc_item_jetpack(); }
+
+.float notteam;
+.float notsingle;
+.float notfree;
+.float notq3a;
+.float notta;
+.string gametype;
+float DoesQ3ARemoveThisEntity()
+{
+ // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY)
+
+ if(self.notq3a)
+ if(!teamplay || g_tdm || g_ctf)
+ return 1;
+
+ if(self.notta)
+ if not(!teamplay || g_tdm || g_ctf)
+ return 1;
+
+ if(self.notsingle)
+ if(maxclients == 1)
+ return 1;
+
+ if(self.notteam)
+ if(teamplay)
+ return 1;
+
+ if(self.notfree)
+ if(!teamplay)
+ return 1;
+
+ if(self.gametype)
+ {
+ string gametypename;
+ // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"};
+ gametypename = "ffa";
+ if(teamplay)
+ gametypename = "team";
+ if(g_arena)
+ gametypename = "tournament";
+ if(g_ctf)
+ gametypename = "ctf";
+ if(maxclients == 1)
+ gametypename = "single";
+ // we do not have the other types (oneflag, obelisk, harvester, teamtournament)
+ if(strstrofs(self.gametype, gametypename, 0) < 0)
+ return 1;
+ }
+
+ return 0;
+}