void Draw_ShowNames_All()
{
- SELFPARAM();
if (!autocvar_hud_shownames) return;
LL_EACH(shownames_ent, true, {
entity entcs = entcs_receiver(i);
// ==============
MUTATOR_HOOKFUNCTION(ons, reset_map_global)
-{SELFPARAM();
+{
FOREACH_CLIENT(IS_PLAYER(it), {
it.ons_roundlost = false;
it.ons_deathloc = '0 0 0';
}
int minigame_addplayer(entity minigame_session, entity player)
-{SELFPARAM();
+{
if ( player.active_minigame )
{
if ( player.active_minigame == minigame_session )
MUTATOR_HOOKFUNCTION(superspec, PlayerDies)
{
- SELFPARAM();
FOREACH_CLIENT(IS_SPEC(it), LAMBDA(
if(it.autospec_flags & ASF_FOLLOWKILLER && IS_PLAYER(frag_attacker) && it.enemy == frag_target)
{
}
void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void() func)
-{SELFPARAM();
+{
WITHSELF(ent, SUB_CalcMove(tdest, tspeedtype, tspeed, func));
}
}
void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void() func)
-{SELFPARAM();
+{
WITHSELF(ent, SUB_CalcAngleMove (destangle, tspeedtype, tspeed, func));
}
target_music_sendto(this, MSG_INIT, 0);
}
void TargetMusic_RestoreGame()
-{SELFPARAM();
+{
for(entity e = world; (e = find(e, classname, "target_music")); )
{
if(e.targetname == "")
}
STATIC_INIT_LATE(W_PROP_reloader)
{
- SELFPARAM();
entity e = W_PROP_reloader = new_pure(W_PROP_reloader);
WITHSELF(e, (e.think = W_PROP_think)());
}
float atk_spread,
float atk_delay,
float atk_lifetime)
-{SELFPARAM();
+{
vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
W_SetupShot_Dir(actor, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage);
METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
- SELFPARAM();
if (fire & 1) {
if(!actor.hook)
if(!(actor.hook_state & HOOK_WAITING_FOR_RELEASE))
}
METHOD(Hook, wr_checkammo1, bool(Hook thiswep, entity actor))
{
- SELFPARAM();
if (!thiswep.ammo_factor) return true;
if(actor.hook)
return actor.ammo_fuel > 0;
}
void W_Porto_Remove(entity p)
-{SELFPARAM();
+{
if(p.porto_current.realowner == p && p.porto_current.classname == "porto")
{
WITHSELF(p.porto_current, W_Porto_Fail(1));
#if 1
#undef self
#define self (this, self)
+ #undef SELFPARAM
+ #define SELFPARAM() const entity this = __self
#endif
// Step 4: kill unstructured setself
void WarpZone_StartFrame()
{
- SELFPARAM();
if (!warpzone_initialized)
{
warpzone_initialized = true;
}
void ClientInit_Spawn()
-{SELFPARAM();
-
+{
entity e = new_pure(clientinit);
e.think = ClientInit_CheckUpdate;
Net_LinkEntity(e, false, 0, ClientInit_SendEntity);
void GameCommand_allspec(float request, float argc)
{
- SELFPARAM();
switch (request)
{
case CMD_REQUEST_COMMAND:
void GameCommand_moveplayer(float request, float argc)
{
- SELFPARAM();
switch (request)
{
case CMD_REQUEST_COMMAND:
void GameCommand_playerdemo(float request, float argc)
{
- SELFPARAM();
switch (request)
{
case CMD_REQUEST_COMMAND:
void GameCommand_shuffleteams(float request)
{
- SELFPARAM();
switch (request)
{
case CMD_REQUEST_COMMAND:
// Resets the state of all clients, items, weapons, waypoints, ... of the map.
void reset_map(bool dorespawn)
{
- SELFPARAM();
-
if (time <= game_starttime && round_handler_IsActive()) round_handler_Reset(game_starttime);
MUTATOR_CALLHOOK(reset_map_global);
this.SendFlags |= 1;
}
void RandomSeed_Spawn()
-{SELFPARAM();
+{
randomseed = new_pure(randomseed);
randomseed.think = RandomSeed_Think;
Net_LinkEntity(randomseed, false, 0, RandomSeed_Send);
*/
void NextLevel()
{
- SELFPARAM();
gameover = true;
intermission_running = 1;
float redirection_timeout;
float redirection_nextthink;
float RedirectionThink()
-{SELFPARAM();
+{
float clients_found;
if(redirection_target == "")
// they win. Otherwise the defending team wins once the timelimit passes.
int WinningCondition_Assault()
{
- SELFPARAM();
WinningConditionHelper(); // set worldstatus
int status = WINNING_NO;
MUTATOR_HOOKFUNCTION(ft, PlayerDies)
{
- SELFPARAM();
if(round_handler_IsActive())
if(round_handler_CountdownRunning())
{
}
void race_ClearRecords()
-{SELFPARAM();
+{
float i;
for(i = 0; i < MAX_CHECKPOINTS; ++i)
.float prevwarntime;
bool weapon_prepareattack_checkammo(Weapon thiswep, entity actor, bool secondary)
{
- SELFPARAM();
if ((actor.items & IT_UNLIMITED_WEAPON_AMMO)) return true;
bool ammo = false;
if (secondary) ammo = thiswep.wr_checkammo2(thiswep, actor);