From 41db6bc512a55b07295c0ae56b495bac519ac14f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 25 Dec 2011 15:31:14 +0000 Subject: [PATCH] Remove 'projectile' field from actor_t because it was entirely unused. WARNING: This silently breaks savegames on 64-bit platforms. git-svn-id: https://svn.eduke32.com/eduke32@2197 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.h | 6 ++---- polymer/eduke32/source/game.c | 4 ---- polymer/eduke32/source/net.c | 1 - polymer/eduke32/source/savegame.c | 3 --- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 3238e3e63..57a48e502 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -108,14 +108,12 @@ typedef struct { void *lightptr; #endif - projectile_t *projectile; //4b/8b - #if !defined SAMESIZE_ACTOR_T || UINTPTR_MAX == 0xffffffff /* 32-bit or old, same-declaration version */ - int8_t filler[16]; // pad struct to 128 bytes + int8_t filler[24]; // pad struct to 128 bytes #else /* 64-bit, will break older savegames */ - int8_t filler[8]; + int8_t filler[16]; #endif } actor_t; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 880338acf..96a25f0d0 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -3765,8 +3765,6 @@ int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int3 Bmemset(&actor[i], 0, sizeof(actor_t)); Bmemcpy(&actor[i].bposx, s, sizeof(vec3_t)); // update bposx/y/z - actor[i].projectile = &SpriteProjectile[i]; - if (s_ow > -1 && s_ow < MAXSPRITES) { actor[i].picnum = sprite[s_ow].picnum; @@ -3864,8 +3862,6 @@ int32_t A_Spawn(int32_t j, int32_t pn) if (PN == SECTOREFFECTOR && SLT == 50) actor[i].picnum = OW; - actor[i].projectile = &SpriteProjectile[i]; - OW = actor[i].owner = i; actor[i].floorz = sector[SECT].floorz; diff --git a/polymer/eduke32/source/net.c b/polymer/eduke32/source/net.c index 8e78a27ff..4b132739b 100644 --- a/polymer/eduke32/source/net.c +++ b/polymer/eduke32/source/net.c @@ -722,7 +722,6 @@ int32_t Net_UnpackSprite(int32_t i, uint8_t *pbuf) j += sizeof(int32_t); } - actor[i].projectile = &SpriteProjectile[i]; #ifdef POLYMER actor[i].lightptr = mylight; actor[i].lightId = lightid; diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 68da2637d..4df4153cf 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -436,7 +436,6 @@ int32_t G_LoadPlayer(int32_t spot) if (scriptptrs[i]&2) T5 += j; if (scriptptrs[i]&4) T6 += j; #endif - actor[i].projectile = &SpriteProjectile[i]; } #if !defined SAMESIZE_ACTOR_T @@ -1995,8 +1994,6 @@ static void sv_postactordata() actor[i].lightptr = NULL; actor[i].lightId = -1; - actor[i].projectile = &SpriteProjectile[i]; - #if !defined SAMESIZE_ACTOR_T if (sprite[i].statnum==MAXSTATUS || actorscrptr[PN]==NULL) continue; if (savegame_bitmap[i>>3][0]&(1<<(i&7))) T2 += (intptr_t)script;