MCPcopy Create free account
hub / github.com/assaultcube/AC / respawnself

Function respawnself

source/src/clientgame.cpp:780–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780void respawnself()
781{
782 if( m_mp(gamemode) ) addmsg(SV_TRYSPAWN, "r");
783 else
784 {
785 if(team_isspect(player1->team))
786 {
787 addmsg(SV_SWITCHTEAM, "ri", m_teammode ? teamatoi(BotManager.GetBotTeam()) : rnd(2));
788 }
789 showscores(false);
790 setscope(false);
791 lasthit = 0;
792 spawnplayer(player1);
793 player1->lifesequence++;
794 player1->weaponswitch(player1->primweap);
795 player1->weaponchanging -= player1->weapons[player1->gunselect]->weaponchangetime/2; // 2011jan16:ft: for a little no-shoot after spawn
796 }
797}
798
799inline const char * spawn_message()
800{

Callers 3

tryrespawnFunction · 0.85
startmapFunction · 0.85
DisableBotViewMethod · 0.85

Calls 7

addmsgFunction · 0.85
teamatoiFunction · 0.85
showscoresFunction · 0.85
setscopeFunction · 0.85
spawnplayerFunction · 0.85
GetBotTeamMethod · 0.80
weaponswitchMethod · 0.80

Tested by

no test coverage detected