MCPcopy Index your code
hub / github.com/assaultcube/AC / renderclientp

Function renderclientp

source/src/rendermodel.cpp:1060–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058}
1059
1060void renderclientp(playerent *d)
1061{
1062 if(!d) return;
1063 int team = team_base(d->team);
1064 const char *cs = NULL, *skinbase = SKINBASE, *teamname = team_basestring(team);
1065 int skinid = 1 + d->skin();
1066 string skin;
1067 if(hidecustomskins == 0 || (hidecustomskins == 1 && !m_teammode))
1068 {
1069 cs = team ? d->skin_rvsf : d->skin_cla;
1070 if(!m_teammode && d->skin_noteam) cs = d->skin_noteam;
1071 }
1072 if(cs)
1073 formatstring(skin)("%s/custom/%s.jpg", skinbase, cs);
1074 else
1075 {
1076 if(!m_teammode || !teamdisplaymode) formatstring(skin)("%s/%s/%02d.jpg", skinbase, teamname, skinid);
1077 else switch(teamdisplaymode)
1078 {
1079 case 1: formatstring(skin)("%s/%s/%02d_%svest.jpg", skinbase, teamname, skinid, team ? "blue" : "red"); break;
1080 case 2: default: formatstring(skin)("%s/%s/%s.jpg", skinbase, teamname, team ? "blue" : "red"); break;
1081 }
1082 }
1083 string vwep;
1084 if(d->weaponsel && !(d->weaponsel->type == GUN_GRENADE && !d->mag[GUN_GRENADE])) formatstring(vwep)("weapons/%s/world", d->weaponsel->info.modelname);
1085 else vwep[0] = 0;
1086 renderclient(d, "playermodels", vwep[0] ? vwep : NULL, -(int)textureload(skin)->id);
1087}
1088
1089void renderclients()
1090{

Callers 2

renderclientsFunction · 0.85
loopvFunction · 0.85

Calls 3

renderclientFunction · 0.85
textureloadFunction · 0.85
skinMethod · 0.80

Tested by

no test coverage detected