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

Function ClearRegisteredItems

code/game/g_items.cpp:1265–1280  ·  view source on GitHub ↗

============== ClearRegisteredItems ============== */

Source from the content-addressed store, hash-verified

1263==============
1264*/
1265void ClearRegisteredItems( void ) {
1266 for ( int i = 0; i < bg_numItems; i++ )
1267 {
1268 itemRegistered[i] = '0';
1269 }
1270 itemRegistered[ bg_numItems ] = 0;
1271
1272 //these are given in g_client, ClientSpawn(), but MUST be registered HERE, BEFORE cgame starts.
1273 //RegisterItem( FindItemForWeapon( WP_NONE ) ); //has no item
1274 RegisterItem( FindItemForInventory( INV_ELECTROBINOCULARS ));
1275 //RegisterItem( FindItemForInventory( INV_BACTA_CANISTER ));
1276 // saber or baton is cached in SP_info_player_deathmatch now.
1277
1278extern void Player_CacheFromPrevLevel(void);//g_client.cpp
1279 Player_CacheFromPrevLevel(); //reads from transition carry-over;
1280}
1281
1282/*
1283===============

Callers 1

InitGameFunction · 0.70

Calls 3

RegisterItemFunction · 0.70
FindItemForInventoryFunction · 0.70

Tested by

no test coverage detected