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

Function G_AddWeaponModels

code/game/g_client.cpp:1828–1845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826}
1827
1828void G_AddWeaponModels( gentity_t *ent )
1829{
1830 if ( !ent || !ent->client )
1831 {
1832 return;
1833 }
1834 if ( ent->weaponModel[0] == -1 )
1835 {
1836 if ( ent->client->ps.weapon == WP_SABER )
1837 {
1838 WP_SaberAddG2SaberModels( ent );
1839 }
1840 else if ( ent->client->ps.weapon != WP_NONE )
1841 {
1842 G_CreateG2AttachedWeaponModel( ent, weaponData[ent->client->ps.weapon].weaponMdl, ent->handRBolt, 0 );
1843 }
1844 }
1845}
1846
1847extern saber_colors_t TranslateSaberColor( const char *name );
1848extern void WP_RemoveSaber( gentity_t *ent, int saberNum );

Callers 2

G_InitPlayerFromCvarsFunction · 0.85
G_ChangePlayerModelFunction · 0.85

Calls 2

WP_SaberAddG2SaberModelsFunction · 0.85

Tested by

no test coverage detected