From 25e25b71fd64207641faf1cc6cfadcedbabd3043 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 25 Jul 2012 18:56:11 +0000 Subject: [PATCH] Make DukePlayer_t's transporter_hold an int16_t again. This was narrowed to int8_t in r1625, breaking CON code that wanted to lock the player for a longer time than 127 game tics. git-svn-id: https://svn.eduke32.com/eduke32@2847 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 1 + polymer/eduke32/source/player.h | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index cb395c34b..8838579ad 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -57,7 +57,7 @@ extern "C" { #define VOLUMEONE (g_Shareware == 1) // increase by 3, because atomic GRP adds 1, and Shareware adds 2 -#define BYTEVERSION_JF 246 +#define BYTEVERSION_JF 249 #define BYTEVERSION_13 27 #define BYTEVERSION_14 116 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 3e0f32782..f887a9d42 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9810,6 +9810,7 @@ int32_t app_main(int32_t argc, const char **argv) Bassert(sizeof(actor_t)==128); Bassert(offsetof(actor_t, bposx) == sizeof(netactor_t)); + Bassert(sizeof(DukePlayer_t)%4 == 0); #ifdef GEKKO L2Enhance(); diff --git a/polymer/eduke32/source/player.h b/polymer/eduke32/source/player.h index 05bf3cb63..2d1099ce3 100644 --- a/polymer/eduke32/source/player.h +++ b/polymer/eduke32/source/player.h @@ -136,6 +136,11 @@ typedef struct { char inven_icon, jetpack_on, heat_on; } DukeStatus_t; +// XXX: r1625 changed a lot types here, among others +// * int32_t --> int16_t +// * int16_t --> int8_t +// * char --> int8_t +// Need to carefully think about implications! typedef struct { vec3_t pos, opos, vel, npos; int32_t bobposx, bobposy; @@ -169,6 +174,7 @@ typedef struct { int16_t orotscrnang, rotscrnang, dead_flag; // JBF 20031220: added orotscrnang int16_t holoduke_on, pycount; + int16_t transporter_hold; uint8_t max_secret_rooms, secret_rooms; uint8_t frag, fraggedself, quick_kick, last_quick_kick; @@ -189,12 +195,14 @@ typedef struct { uint8_t toggle_key_flag, knuckle_incs, knee_incs, access_incs; uint8_t walking_snd_toggle, palookup, hard_landing, fist_incs; - int8_t numloogs, loogcnt, scream_voice, transporter_hold; + int8_t numloogs, loogcnt, scream_voice; int8_t last_weapon, cheat_phase, weapon_pos, wantweaponfire, curr_weapon; palette_t pals; char name[32]; + + int8_t padding_; } DukePlayer_t; typedef struct {