diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-12 16:29:12 +0200 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-07-12 17:06:40 +0200 |
commit | ee3e2ce63c1f6810d36cc4e22eddeb51527efc1d (patch) | |
tree | 27b71dfd256ea1a8bed146ecc9b7e93db86bff18 | |
parent | 083ea6fdd483db696cdd95ef3b7ba4d29b85b201 (diff) |
separate MISC_INFOHEAD into 2 fields, because a single 16-bit field is not enough to store 2 entity numbers (20 bits)
-rw-r--r-- | src/cgame/cg_weapons.c | 4 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_active.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 55ad649..19a0bfc 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -911,9 +911,9 @@ static void CG_GenerateCKitDisplay( void ) part 1: figure out what we're dealing with */ - powerNetwork = ( ps->misc[ MISC_INFOHEAD ] & 1023 ); + powerNetwork = ps->misc[ MISC_POWER_NETWORK ] & 1023; - probeEntity = ( ps->misc[ MISC_INFOHEAD ] >> 10 ) & 1023; + probeEntity = ps->misc[ MISC_PROBE_ENTITY ] & 1023; if( probeEntity != 1023 ) { target = qtrue; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 1fa36ca..28a4fa7 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -299,7 +299,8 @@ typedef enum // player_state->misc[] indexes typedef enum { - MISC_INFOHEAD, + MISC_POWER_NETWORK, + MISC_PROBE_ENTITY, MISC_INFO1, MISC_INFO2, MISC_INFO3, diff --git a/src/game/g_active.c b/src/game/g_active.c index c21eec0..73e9962 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -811,7 +811,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) } } - client->ps.misc[ MISC_INFOHEAD ] = ( head_network & 1023 ) | ( head_entity & 1023 ) << 10; + client->ps.misc[ MISC_POWER_NETWORK ] = head_network; + client->ps.misc[ MISC_PROBE_ENTITY ] = head_entity; } } |