DropAllRunes(self);
MUTATOR_CALLHOOK(MakePlayerObserver);
+ if (g_minstagib)
+ minstagib_stop_countdown();
+
Portal_ClearAll(self);
if(self.alivetime)
{
if(self.cnt <= 10)
AnnounceTo(self.owner, strcat(ftos(self.cnt), ""));
+ // TODO: Send_CSQC_Centerprint_Generic only once
if(self.owner.killindicator_teamchange)
{
if(self.owner.killindicator_teamchange == -1)
- centerprint(self.owner, strcat("Changing team in ", ftos(self.cnt), " seconds"));
+ Send_CSQC_Centerprint_Generic(self.owner, CPID_TEAMCHANGE, "Changing team in %d seconds", 1, self.cnt);
else if(self.owner.killindicator_teamchange == -2)
- centerprint(self.owner, strcat("Spectating in ", ftos(self.cnt), " seconds"));
+ Send_CSQC_Centerprint_Generic(self.owner, CPID_TEAMCHANGE, "Spectating in %d seconds", 1, self.cnt);
else
- centerprint(self.owner, strcat("Changing to ", ColoredTeamName(self.owner.killindicator_teamchange), " in ", ftos(self.cnt), " seconds"));
+ Send_CSQC_Centerprint_Generic(self.owner, CPID_TEAMCHANGE, strcat("Changing to ", ColoredTeamName(self.owner.killindicator_teamchange), " in %d seconds"), 1, self.cnt);
}
else
- centerprint(self.owner, strcat("^1Suicide in ", ftos(self.cnt), " seconds"));
+ Send_CSQC_Centerprint_Generic(self.owner, CPID_KILL, "^1Suicide in %d seconds", 1, self.cnt);
}
self.nextthink = time + 1;
self.cnt -= 1;
bprint("\n");
- self.welcomemessage_time = 0;
-
stuffcmd(self, strcat(clientstuff, "\n"));
stuffcmd(self, strcat("exec maps/", mapname, ".cfg\n"));
stuffcmd(self, "cl_particles_reloadeffects\n");
set_dom_state(self);
CheatInitClient();
+
+ // FIXME: .BUTTON_INFO in PrintWelcomeMessage must be checked at every frame, not just here
+ PrintWelcomeMessage(self);
}
/*
else {
retStr = strcat("Timeout ends in ", ftos(remainingTimeoutTime), " seconds!\n");
//don't show messages like "Timeout ends in 0 seconds"...
- if (remainingTimeoutTime > 0)
+ if ((remainingTimeoutTime) > 0)
return retStr;
else
return "";
bprint ("^4", self.netname, "^4 is playing now\n");
if(!autocvar_g_campaign)
- centerprint(self,""); // clear MOTD
+ Send_CSQC_Centerprint_Generic(self, CPID_MOTD, "", 1, 0); // clear MOTD
return;
} else {
}
}
}
- PrintWelcomeMessage(self);
}
void SpectatorThink()
}
}
- PrintWelcomeMessage(self);
self.flags |= FL_CLIENT | FL_NOTARGET;
}
CheckRules_Player();
- PrintWelcomeMessage(self);
-
if (intermission_running)
{
IntermissionThink (); // otherwise a button could be missed between
player_powerups();
}
+ if (g_minstagib)
+ minstagib_ammocheck();
+
if (self.deadflag != DEAD_NO)
{
float button_pressed, force_respawn;
}
return;
}
+ // FIXME from now on self.deadflag is always 0 (and self.health is never < 1)
+ // so (self.deadflag == DEAD_NO) is always true in the code below
if(g_touchexplode)
if(time > self.touchexplode_time)
if(frametime)
player_anim();
- if (g_minstagib)
- minstagib_ammocheck();
-
if(g_ctf)
ctf_setstatus();
{
if(timeleft != self.idlekick_lasttimeleft)
{
- centerprint_atprio(self, CENTERPRIO_IDLEKICK, strcat("^3Stop idling!\n^3Disconnecting in ", ftos(timeleft), "..."));
+ // TODO: send this msg only once
+ Send_CSQC_Centerprint_Generic(self, CPID_DISCONNECT_IDLING, "^3Stop idling!\n^3Disconnecting in %d seconds...", 1, timeleft);
AnnounceTo(self, strcat(ftos(timeleft), ""));
}
}
else
{
- centerprint_expire(self, CENTERPRIO_IDLEKICK);
+ Send_CSQC_Centerprint_Generic(self, CPID_DISCONNECT_IDLING, "", 1, timeleft);
}
self.idlekick_lasttimeleft = timeleft;
}