MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Svcmd_PlayerModel_f

Function Svcmd_PlayerModel_f

code/game/g_svcmds.cpp:763–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763static void Svcmd_PlayerModel_f(void)
764{
765 if ( gi.argc() == 1 )
766 {
767 gi.Printf( S_COLOR_RED "USAGE: playerModel <NPC Name>\n playerModel <g2model> <skinhead> <skintorso> <skinlower>\n playerModel player (builds player from customized menu settings)" S_COLOR_WHITE "\n" );
768 gi.Printf( "playerModel = %s ", va("%s %s %s %s\n", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string ) );
769 }
770 else if ( gi.argc() == 2 )
771 {
772 G_ChangePlayerModel( &g_entities[0], gi.argv(1) );
773 }
774 else if ( gi.argc() == 5 )
775 {
776 //instead of setting it directly via a command, we now store it in cvars
777 //G_ChangePlayerModel( &g_entities[0], va("%s|%s|%s|%s", gi.argv(1), gi.argv(2), gi.argv(3), gi.argv(4)) );
778 gi.cvar_set("g_char_model", gi.argv(1) );
779 gi.cvar_set("g_char_skin_head", gi.argv(2) );
780 gi.cvar_set("g_char_skin_torso", gi.argv(3) );
781 gi.cvar_set("g_char_skin_legs", gi.argv(4) );
782 G_InitPlayerFromCvars( &g_entities[0] );
783 }
784}
785
786static void Svcmd_PlayerTint_f(void)
787{

Callers

nothing calls this directly

Calls 3

G_ChangePlayerModelFunction · 0.85
G_InitPlayerFromCvarsFunction · 0.85
vaFunction · 0.50

Tested by

no test coverage detected