mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix skin shit
This commit is contained in:
parent
b2e12461d9
commit
e59a7175be
8 changed files with 31 additions and 281 deletions
|
|
@ -271,13 +271,7 @@ void B_RespawnBot(INT32 playernum)
|
||||||
player->powers[pw_nocontrol] = sonic->player->powers[pw_nocontrol];
|
player->powers[pw_nocontrol] = sonic->player->powers[pw_nocontrol];
|
||||||
|
|
||||||
P_TeleportMove(tails, x, y, z);
|
P_TeleportMove(tails, x, y, z);
|
||||||
if (player->charability == CA_FLY)
|
P_SetPlayerMobjState(tails, S_KART_STND1); // SRB2kart - was S_PLAY_FALL1
|
||||||
{
|
|
||||||
P_SetPlayerMobjState(tails, S_KART_STND1); // SRB2kart - was S_PLAY_ABL1
|
|
||||||
tails->player->powers[pw_tailsfly] = (UINT16)-1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
P_SetPlayerMobjState(tails, S_KART_STND1); // SRB2kart - was S_PLAY_FALL1
|
|
||||||
P_SetScale(tails, sonic->scale);
|
P_SetScale(tails, sonic->scale);
|
||||||
tails->destscale = sonic->destscale;
|
tails->destscale = sonic->destscale;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -585,21 +585,7 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
|
||||||
rsp->kartspeed = (UINT8)players[i].kartspeed;
|
rsp->kartspeed = (UINT8)players[i].kartspeed;
|
||||||
rsp->kartweight = (UINT8)players[i].kartweight;
|
rsp->kartweight = (UINT8)players[i].kartweight;
|
||||||
//
|
//
|
||||||
rsp->normalspeed = (fixed_t)LONG(players[i].normalspeed);
|
|
||||||
rsp->runspeed = (fixed_t)LONG(players[i].runspeed);
|
|
||||||
rsp->thrustfactor = players[i].thrustfactor;
|
|
||||||
rsp->accelstart = players[i].accelstart;
|
|
||||||
rsp->acceleration = players[i].acceleration;
|
|
||||||
rsp->charability = players[i].charability;
|
|
||||||
rsp->charability2 = players[i].charability2;
|
|
||||||
rsp->charflags = (UINT32)LONG(players[i].charflags);
|
rsp->charflags = (UINT32)LONG(players[i].charflags);
|
||||||
rsp->thokitem = (UINT32)LONG(players[i].thokitem); //mobjtype_t
|
|
||||||
rsp->spinitem = (UINT32)LONG(players[i].spinitem); //mobjtype_t
|
|
||||||
rsp->revitem = (UINT32)LONG(players[i].revitem); //mobjtype_t
|
|
||||||
rsp->actionspd = (fixed_t)LONG(players[i].actionspd);
|
|
||||||
rsp->mindash = (fixed_t)LONG(players[i].mindash);
|
|
||||||
rsp->maxdash = (fixed_t)LONG(players[i].maxdash);
|
|
||||||
rsp->jumpfactor = (fixed_t)LONG(players[i].jumpfactor);
|
|
||||||
|
|
||||||
rsp->speed = (fixed_t)LONG(players[i].speed);
|
rsp->speed = (fixed_t)LONG(players[i].speed);
|
||||||
rsp->jumping = players[i].jumping;
|
rsp->jumping = players[i].jumping;
|
||||||
|
|
@ -722,21 +708,7 @@ static void resynch_read_player(resynch_pak *rsp)
|
||||||
players[i].kartspeed = (UINT8)rsp->kartspeed;
|
players[i].kartspeed = (UINT8)rsp->kartspeed;
|
||||||
players[i].kartweight = (UINT8)rsp->kartweight;
|
players[i].kartweight = (UINT8)rsp->kartweight;
|
||||||
|
|
||||||
players[i].normalspeed = (fixed_t)LONG(rsp->normalspeed);
|
|
||||||
players[i].runspeed = (fixed_t)LONG(rsp->runspeed);
|
|
||||||
players[i].thrustfactor = rsp->thrustfactor;
|
|
||||||
players[i].accelstart = rsp->accelstart;
|
|
||||||
players[i].acceleration = rsp->acceleration;
|
|
||||||
players[i].charability = rsp->charability;
|
|
||||||
players[i].charability2 = rsp->charability2;
|
|
||||||
players[i].charflags = (UINT32)LONG(rsp->charflags);
|
players[i].charflags = (UINT32)LONG(rsp->charflags);
|
||||||
players[i].thokitem = (UINT32)LONG(rsp->thokitem); //mobjtype_t
|
|
||||||
players[i].spinitem = (UINT32)LONG(rsp->spinitem); //mobjtype_t
|
|
||||||
players[i].revitem = (UINT32)LONG(rsp->revitem); //mobjtype_t
|
|
||||||
players[i].actionspd = (fixed_t)LONG(rsp->actionspd);
|
|
||||||
players[i].mindash = (fixed_t)LONG(rsp->mindash);
|
|
||||||
players[i].maxdash = (fixed_t)LONG(rsp->maxdash);
|
|
||||||
players[i].jumpfactor = (fixed_t)LONG(rsp->jumpfactor);
|
|
||||||
|
|
||||||
players[i].speed = (fixed_t)LONG(rsp->speed);
|
players[i].speed = (fixed_t)LONG(rsp->speed);
|
||||||
players[i].jumping = rsp->jumping;
|
players[i].jumping = rsp->jumping;
|
||||||
|
|
|
||||||
|
|
@ -224,21 +224,7 @@ typedef struct
|
||||||
UINT8 kartspeed;
|
UINT8 kartspeed;
|
||||||
UINT8 kartweight;
|
UINT8 kartweight;
|
||||||
//
|
//
|
||||||
fixed_t normalspeed;
|
|
||||||
fixed_t runspeed;
|
|
||||||
UINT8 thrustfactor;
|
|
||||||
UINT8 accelstart;
|
|
||||||
UINT8 acceleration;
|
|
||||||
UINT8 charability;
|
|
||||||
UINT8 charability2;
|
|
||||||
UINT32 charflags;
|
UINT32 charflags;
|
||||||
UINT32 thokitem; // mobjtype_t
|
|
||||||
UINT32 spinitem; // mobjtype_t
|
|
||||||
UINT32 revitem; // mobjtype_t
|
|
||||||
fixed_t actionspd;
|
|
||||||
fixed_t mindash;
|
|
||||||
fixed_t maxdash;
|
|
||||||
fixed_t jumpfactor;
|
|
||||||
|
|
||||||
fixed_t speed;
|
fixed_t speed;
|
||||||
UINT8 jumping;
|
UINT8 jumping;
|
||||||
|
|
|
||||||
|
|
@ -35,33 +35,6 @@ typedef enum
|
||||||
SF_HIRES = 1, // Draw the sprite 2x as small?
|
SF_HIRES = 1, // Draw the sprite 2x as small?
|
||||||
} skinflags_t;
|
} skinflags_t;
|
||||||
|
|
||||||
//Primary and secondary skin abilities
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CA_NONE=0,
|
|
||||||
CA_THOK,
|
|
||||||
CA_FLY,
|
|
||||||
CA_GLIDEANDCLIMB,
|
|
||||||
CA_HOMINGTHOK,
|
|
||||||
CA_SWIM,
|
|
||||||
CA_DOUBLEJUMP,
|
|
||||||
CA_FLOAT,
|
|
||||||
CA_SLOWFALL,
|
|
||||||
CA_TELEKINESIS,
|
|
||||||
CA_FALLSWITCH,
|
|
||||||
CA_JUMPBOOST,
|
|
||||||
CA_AIRDRILL,
|
|
||||||
CA_JUMPTHOK
|
|
||||||
} charability_t;
|
|
||||||
|
|
||||||
//Secondary skin abilities
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CA2_NONE=0,
|
|
||||||
CA2_SPINDASH,
|
|
||||||
CA2_MULTIABILITY
|
|
||||||
} charability2_t;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Player states.
|
// Player states.
|
||||||
//
|
//
|
||||||
|
|
@ -442,29 +415,8 @@ typedef struct player_s
|
||||||
UINT8 kartweight; // Kart weight stat between 1 and 9
|
UINT8 kartweight; // Kart weight stat between 1 and 9
|
||||||
//
|
//
|
||||||
|
|
||||||
fixed_t normalspeed; // Normal ground
|
|
||||||
fixed_t runspeed; // Speed you break into the run animation
|
|
||||||
UINT8 thrustfactor; // Thrust = thrustfactor * acceleration
|
|
||||||
UINT8 accelstart; // Starting acceleration if speed = 0.
|
|
||||||
UINT8 acceleration; // Acceleration
|
|
||||||
|
|
||||||
// See charability_t and charability2_t for more information.
|
|
||||||
UINT8 charability; // Ability definition
|
|
||||||
UINT8 charability2; // Secondary ability definition
|
|
||||||
|
|
||||||
UINT32 charflags; // Extra abilities/settings for skins (combinable stuff)
|
UINT32 charflags; // Extra abilities/settings for skins (combinable stuff)
|
||||||
// See SF_ flags
|
// See SF_ flags
|
||||||
|
|
||||||
mobjtype_t thokitem; // Object # to spawn for the thok
|
|
||||||
mobjtype_t spinitem; // Object # to spawn for spindash/spinning
|
|
||||||
mobjtype_t revitem; // Object # to spawn for spindash/spinning
|
|
||||||
|
|
||||||
fixed_t actionspd; // Speed of thok/glide/fly
|
|
||||||
fixed_t mindash; // Minimum spindash speed
|
|
||||||
fixed_t maxdash; // Maximum spindash speed
|
|
||||||
|
|
||||||
fixed_t jumpfactor; // How high can the player jump?
|
|
||||||
|
|
||||||
SINT8 lives;
|
SINT8 lives;
|
||||||
SINT8 continues; // continues that player has acquired
|
SINT8 continues; // continues that player has acquired
|
||||||
|
|
||||||
|
|
|
||||||
94
src/g_game.c
94
src/g_game.c
|
|
@ -2325,25 +2325,12 @@ void G_PlayerReborn(INT32 player)
|
||||||
INT32 score, marescore;
|
INT32 score, marescore;
|
||||||
INT32 lives;
|
INT32 lives;
|
||||||
INT32 continues;
|
INT32 continues;
|
||||||
UINT8 charability;
|
|
||||||
UINT8 charability2;
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
UINT8 kartspeed;
|
UINT8 kartspeed;
|
||||||
UINT8 kartweight;
|
UINT8 kartweight;
|
||||||
//
|
//
|
||||||
fixed_t normalspeed;
|
|
||||||
fixed_t runspeed;
|
|
||||||
UINT8 thrustfactor;
|
|
||||||
UINT8 accelstart;
|
|
||||||
UINT8 acceleration;
|
|
||||||
INT32 charflags;
|
INT32 charflags;
|
||||||
INT32 pflags;
|
INT32 pflags;
|
||||||
UINT32 thokitem;
|
|
||||||
UINT32 spinitem;
|
|
||||||
UINT32 revitem;
|
|
||||||
fixed_t actionspd;
|
|
||||||
fixed_t mindash;
|
|
||||||
fixed_t maxdash;
|
|
||||||
INT32 ctfteam;
|
INT32 ctfteam;
|
||||||
INT32 starposttime;
|
INT32 starposttime;
|
||||||
INT16 starpostx;
|
INT16 starpostx;
|
||||||
|
|
@ -2399,18 +2386,10 @@ void G_PlayerReborn(INT32 player)
|
||||||
|
|
||||||
skincolor = players[player].skincolor;
|
skincolor = players[player].skincolor;
|
||||||
skin = players[player].skin;
|
skin = players[player].skin;
|
||||||
charability = players[player].charability;
|
|
||||||
charability2 = players[player].charability2;
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
kartspeed = players[player].kartspeed;
|
kartspeed = players[player].kartspeed;
|
||||||
kartweight = players[player].kartweight;
|
kartweight = players[player].kartweight;
|
||||||
//
|
//
|
||||||
normalspeed = players[player].normalspeed;
|
|
||||||
runspeed = players[player].runspeed;
|
|
||||||
thrustfactor = players[player].thrustfactor;
|
|
||||||
accelstart = players[player].accelstart;
|
|
||||||
acceleration = players[player].acceleration;
|
|
||||||
charflags = players[player].charflags;
|
|
||||||
|
|
||||||
starposttime = players[player].starposttime;
|
starposttime = players[player].starposttime;
|
||||||
starpostx = players[player].starpostx;
|
starpostx = players[player].starpostx;
|
||||||
|
|
@ -2419,13 +2398,6 @@ void G_PlayerReborn(INT32 player)
|
||||||
starpostnum = players[player].starpostnum;
|
starpostnum = players[player].starpostnum;
|
||||||
respawnflip = players[player].kartstuff[k_starpostflip]; //SRB2KART
|
respawnflip = players[player].kartstuff[k_starpostflip]; //SRB2KART
|
||||||
starpostangle = players[player].starpostangle;
|
starpostangle = players[player].starpostangle;
|
||||||
jumpfactor = players[player].jumpfactor;
|
|
||||||
thokitem = players[player].thokitem;
|
|
||||||
spinitem = players[player].spinitem;
|
|
||||||
revitem = players[player].revitem;
|
|
||||||
actionspd = players[player].actionspd;
|
|
||||||
mindash = players[player].mindash;
|
|
||||||
maxdash = players[player].maxdash;
|
|
||||||
|
|
||||||
mare = players[player].mare;
|
mare = players[player].mare;
|
||||||
bot = players[player].bot;
|
bot = players[player].bot;
|
||||||
|
|
@ -2489,24 +2461,11 @@ void G_PlayerReborn(INT32 player)
|
||||||
// save player config truth reborn
|
// save player config truth reborn
|
||||||
p->skincolor = skincolor;
|
p->skincolor = skincolor;
|
||||||
p->skin = skin;
|
p->skin = skin;
|
||||||
p->charability = charability;
|
|
||||||
p->charability2 = charability2;
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
p->kartspeed = kartspeed;
|
p->kartspeed = kartspeed;
|
||||||
p->kartweight = kartweight;
|
p->kartweight = kartweight;
|
||||||
//
|
//
|
||||||
p->normalspeed = normalspeed;
|
|
||||||
p->runspeed = runspeed;
|
|
||||||
p->thrustfactor = thrustfactor;
|
|
||||||
p->accelstart = accelstart;
|
|
||||||
p->acceleration = acceleration;
|
|
||||||
p->charflags = charflags;
|
p->charflags = charflags;
|
||||||
p->thokitem = thokitem;
|
|
||||||
p->spinitem = spinitem;
|
|
||||||
p->revitem = revitem;
|
|
||||||
p->actionspd = actionspd;
|
|
||||||
p->mindash = mindash;
|
|
||||||
p->maxdash = maxdash;
|
|
||||||
|
|
||||||
p->starposttime = starposttime;
|
p->starposttime = starposttime;
|
||||||
p->starpostx = starpostx;
|
p->starpostx = starpostx;
|
||||||
|
|
@ -2514,7 +2473,6 @@ void G_PlayerReborn(INT32 player)
|
||||||
p->starpostz = starpostz;
|
p->starpostz = starpostz;
|
||||||
p->starpostnum = starpostnum;
|
p->starpostnum = starpostnum;
|
||||||
p->starpostangle = starpostangle;
|
p->starpostangle = starpostangle;
|
||||||
p->jumpfactor = jumpfactor;
|
|
||||||
p->exiting = exiting;
|
p->exiting = exiting;
|
||||||
|
|
||||||
p->numboxes = numboxes;
|
p->numboxes = numboxes;
|
||||||
|
|
@ -5531,24 +5489,8 @@ void G_BeginRecording(void)
|
||||||
demo_p += 16;
|
demo_p += 16;
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
WRITEUINT8(demo_p,player->charability);
|
|
||||||
WRITEUINT8(demo_p,player->charability2);
|
|
||||||
WRITEUINT8(demo_p,player->actionspd>>FRACBITS);
|
|
||||||
WRITEUINT8(demo_p,player->mindash>>FRACBITS);
|
|
||||||
WRITEUINT8(demo_p,player->maxdash>>FRACBITS);
|
|
||||||
// SRB2kart
|
|
||||||
WRITEUINT8(demo_p,player->kartspeed);
|
WRITEUINT8(demo_p,player->kartspeed);
|
||||||
WRITEUINT8(demo_p,player->kartweight);
|
WRITEUINT8(demo_p,player->kartweight);
|
||||||
//
|
|
||||||
WRITEUINT8(demo_p,player->normalspeed>>FRACBITS);
|
|
||||||
WRITEUINT8(demo_p,player->runspeed>>FRACBITS);
|
|
||||||
WRITEUINT8(demo_p,player->thrustfactor);
|
|
||||||
WRITEUINT8(demo_p,player->accelstart);
|
|
||||||
WRITEUINT8(demo_p,player->acceleration);
|
|
||||||
|
|
||||||
// Trying to convert it back to % causes demo desync due to precision loss.
|
|
||||||
// Don't do it.
|
|
||||||
WRITEFIXED(demo_p, player->jumpfactor);
|
|
||||||
|
|
||||||
// Save netvar data (SONICCD, etc)
|
// Save netvar data (SONICCD, etc)
|
||||||
CV_SaveNetVars(&demo_p);
|
CV_SaveNetVars(&demo_p);
|
||||||
|
|
@ -5761,9 +5703,8 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
lumpnum_t l;
|
lumpnum_t l;
|
||||||
char skin[17],color[17],*n,*pdemoname;
|
char skin[17],color[17],*n,*pdemoname;
|
||||||
UINT8 version,subversion,charability,charability2,kartspeed,kartweight,thrustfactor,accelstart,acceleration;
|
UINT8 version,subversion,kartspeed,kartweight;
|
||||||
UINT32 randseed;
|
UINT32 randseed;
|
||||||
fixed_t actionspd,mindash,maxdash,normalspeed,runspeed,jumpfactor;
|
|
||||||
char msg[1024];
|
char msg[1024];
|
||||||
#if defined(SKIPERRORS) && !defined(DEVELOP)
|
#if defined(SKIPERRORS) && !defined(DEVELOP)
|
||||||
boolean skiperrors = false;
|
boolean skiperrors = false;
|
||||||
|
|
@ -5900,21 +5841,21 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
M_Memcpy(color,demo_p,16);
|
M_Memcpy(color,demo_p,16);
|
||||||
demo_p += 16;
|
demo_p += 16;
|
||||||
|
|
||||||
charability = READUINT8(demo_p);
|
demo_p++; // charability
|
||||||
charability2 = READUINT8(demo_p);
|
demo_p++; // charability2
|
||||||
actionspd = (fixed_t)READUINT8(demo_p)<<FRACBITS;
|
demo_p++; // actionspd
|
||||||
mindash = (fixed_t)READUINT8(demo_p)<<FRACBITS;
|
demo_p++; // mindash
|
||||||
maxdash = (fixed_t)READUINT8(demo_p)<<FRACBITS;
|
demo_p++; // maxdash
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
kartspeed = READUINT8(demo_p);
|
kartspeed = READUINT8(demo_p);
|
||||||
kartweight = READUINT8(demo_p);
|
kartweight = READUINT8(demo_p);
|
||||||
//
|
//
|
||||||
normalspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS;
|
demo_p++; // normalspeed
|
||||||
runspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS;
|
demo_p++; // runspeed
|
||||||
thrustfactor = READUINT8(demo_p);
|
demo_p++; // thrustfactor
|
||||||
accelstart = READUINT8(demo_p);
|
demo_p++; // accelstart
|
||||||
acceleration = READUINT8(demo_p);
|
demo_p++; // acceleration
|
||||||
jumpfactor = READFIXED(demo_p);
|
demo_p += 4; // jumpfactor
|
||||||
|
|
||||||
// net var data
|
// net var data
|
||||||
CV_LoadNetVars(&demo_p);
|
CV_LoadNetVars(&demo_p);
|
||||||
|
|
@ -6008,21 +5949,10 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
// Set saved attribute values
|
// Set saved attribute values
|
||||||
// No cheat checking here, because even if they ARE wrong...
|
// No cheat checking here, because even if they ARE wrong...
|
||||||
// it would only break the replay if we clipped them.
|
// it would only break the replay if we clipped them.
|
||||||
players[0].charability = charability;
|
|
||||||
players[0].charability2 = charability2;
|
|
||||||
players[0].actionspd = actionspd;
|
|
||||||
players[0].mindash = mindash;
|
|
||||||
players[0].maxdash = maxdash;
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
players[0].kartspeed = kartspeed;
|
players[0].kartspeed = kartspeed;
|
||||||
players[0].kartweight = kartweight;
|
players[0].kartweight = kartweight;
|
||||||
//
|
//
|
||||||
players[0].normalspeed = normalspeed;
|
|
||||||
players[0].runspeed = runspeed;
|
|
||||||
players[0].thrustfactor = thrustfactor;
|
|
||||||
players[0].accelstart = accelstart;
|
|
||||||
players[0].acceleration = acceleration;
|
|
||||||
players[0].jumpfactor = jumpfactor;
|
|
||||||
|
|
||||||
demo_start = true;
|
demo_start = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,36 +155,8 @@ static int player_get(lua_State *L)
|
||||||
else if (fastcmp(field,"kartweight"))
|
else if (fastcmp(field,"kartweight"))
|
||||||
lua_pushinteger(L, plr->kartweight);
|
lua_pushinteger(L, plr->kartweight);
|
||||||
//
|
//
|
||||||
else if (fastcmp(field,"normalspeed"))
|
|
||||||
lua_pushfixed(L, plr->normalspeed);
|
|
||||||
else if (fastcmp(field,"runspeed"))
|
|
||||||
lua_pushfixed(L, plr->runspeed);
|
|
||||||
else if (fastcmp(field,"thrustfactor"))
|
|
||||||
lua_pushinteger(L, plr->thrustfactor);
|
|
||||||
else if (fastcmp(field,"accelstart"))
|
|
||||||
lua_pushinteger(L, plr->accelstart);
|
|
||||||
else if (fastcmp(field,"acceleration"))
|
|
||||||
lua_pushinteger(L, plr->acceleration);
|
|
||||||
else if (fastcmp(field,"charability"))
|
|
||||||
lua_pushinteger(L, plr->charability);
|
|
||||||
else if (fastcmp(field,"charability2"))
|
|
||||||
lua_pushinteger(L, plr->charability2);
|
|
||||||
else if (fastcmp(field,"charflags"))
|
else if (fastcmp(field,"charflags"))
|
||||||
lua_pushinteger(L, plr->charflags);
|
lua_pushinteger(L, plr->charflags);
|
||||||
else if (fastcmp(field,"thokitem"))
|
|
||||||
lua_pushinteger(L, plr->thokitem);
|
|
||||||
else if (fastcmp(field,"spinitem"))
|
|
||||||
lua_pushinteger(L, plr->spinitem);
|
|
||||||
else if (fastcmp(field,"revitem"))
|
|
||||||
lua_pushinteger(L, plr->revitem);
|
|
||||||
else if (fastcmp(field,"actionspd"))
|
|
||||||
lua_pushfixed(L, plr->actionspd);
|
|
||||||
else if (fastcmp(field,"mindash"))
|
|
||||||
lua_pushfixed(L, plr->mindash);
|
|
||||||
else if (fastcmp(field,"maxdash"))
|
|
||||||
lua_pushfixed(L, plr->maxdash);
|
|
||||||
else if (fastcmp(field,"jumpfactor"))
|
|
||||||
lua_pushfixed(L, plr->jumpfactor);
|
|
||||||
else if (fastcmp(field,"lives"))
|
else if (fastcmp(field,"lives"))
|
||||||
lua_pushinteger(L, plr->lives);
|
lua_pushinteger(L, plr->lives);
|
||||||
else if (fastcmp(field,"continues"))
|
else if (fastcmp(field,"continues"))
|
||||||
|
|
@ -431,36 +403,8 @@ static int player_set(lua_State *L)
|
||||||
else if (fastcmp(field,"kartweight"))
|
else if (fastcmp(field,"kartweight"))
|
||||||
plr->kartweight = (UINT8)luaL_checkinteger(L, 3);
|
plr->kartweight = (UINT8)luaL_checkinteger(L, 3);
|
||||||
//
|
//
|
||||||
else if (fastcmp(field,"normalspeed"))
|
|
||||||
plr->normalspeed = luaL_checkfixed(L, 3);
|
|
||||||
else if (fastcmp(field,"runspeed"))
|
|
||||||
plr->runspeed = luaL_checkfixed(L, 3);
|
|
||||||
else if (fastcmp(field,"thrustfactor"))
|
|
||||||
plr->thrustfactor = (UINT8)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"accelstart"))
|
|
||||||
plr->accelstart = (UINT8)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"acceleration"))
|
|
||||||
plr->acceleration = (UINT8)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"charability"))
|
|
||||||
plr->charability = (UINT8)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"charability2"))
|
|
||||||
plr->charability2 = (UINT8)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"charflags"))
|
else if (fastcmp(field,"charflags"))
|
||||||
plr->charflags = (UINT32)luaL_checkinteger(L, 3);
|
plr->charflags = (UINT32)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"thokitem"))
|
|
||||||
plr->thokitem = luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"spinitem"))
|
|
||||||
plr->spinitem = luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"revitem"))
|
|
||||||
plr->revitem = luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"actionspd"))
|
|
||||||
plr->actionspd = (INT32)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"mindash"))
|
|
||||||
plr->mindash = (INT32)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"maxdash"))
|
|
||||||
plr->maxdash = (INT32)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"jumpfactor"))
|
|
||||||
plr->jumpfactor = (INT32)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"lives"))
|
else if (fastcmp(field,"lives"))
|
||||||
plr->lives = (SINT8)luaL_checkinteger(L, 3);
|
plr->lives = (SINT8)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"continues"))
|
else if (fastcmp(field,"continues"))
|
||||||
|
|
|
||||||
|
|
@ -265,25 +265,11 @@ static void P_NetArchivePlayers(void)
|
||||||
if (flags & AWAYVIEW)
|
if (flags & AWAYVIEW)
|
||||||
WRITEUINT32(save_p, players[i].awayviewmobj->mobjnum);
|
WRITEUINT32(save_p, players[i].awayviewmobj->mobjnum);
|
||||||
|
|
||||||
WRITEUINT8(save_p, players[i].charability);
|
|
||||||
WRITEUINT8(save_p, players[i].charability2);
|
|
||||||
WRITEUINT32(save_p, players[i].charflags);
|
WRITEUINT32(save_p, players[i].charflags);
|
||||||
WRITEUINT32(save_p, (UINT32)players[i].thokitem);
|
|
||||||
WRITEUINT32(save_p, (UINT32)players[i].spinitem);
|
|
||||||
WRITEUINT32(save_p, (UINT32)players[i].revitem);
|
|
||||||
WRITEFIXED(save_p, players[i].actionspd);
|
|
||||||
WRITEFIXED(save_p, players[i].mindash);
|
|
||||||
WRITEFIXED(save_p, players[i].maxdash);
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
WRITEUINT8(save_p, players[i].kartspeed);
|
WRITEUINT8(save_p, players[i].kartspeed);
|
||||||
WRITEUINT8(save_p, players[i].kartweight);
|
WRITEUINT8(save_p, players[i].kartweight);
|
||||||
//
|
//
|
||||||
WRITEFIXED(save_p, players[i].normalspeed);
|
|
||||||
WRITEFIXED(save_p, players[i].runspeed);
|
|
||||||
WRITEUINT8(save_p, players[i].thrustfactor);
|
|
||||||
WRITEUINT8(save_p, players[i].accelstart);
|
|
||||||
WRITEUINT8(save_p, players[i].acceleration);
|
|
||||||
WRITEFIXED(save_p, players[i].jumpfactor);
|
|
||||||
|
|
||||||
for (j = 0; j < MAXPREDICTTICS; j++)
|
for (j = 0; j < MAXPREDICTTICS; j++)
|
||||||
{
|
{
|
||||||
|
|
@ -447,25 +433,11 @@ static void P_NetUnArchivePlayers(void)
|
||||||
players[i].viewheight = 32<<FRACBITS;
|
players[i].viewheight = 32<<FRACBITS;
|
||||||
|
|
||||||
//SetPlayerSkinByNum(i, players[i].skin);
|
//SetPlayerSkinByNum(i, players[i].skin);
|
||||||
players[i].charability = READUINT8(save_p);
|
|
||||||
players[i].charability2 = READUINT8(save_p);
|
|
||||||
players[i].charflags = READUINT32(save_p);
|
players[i].charflags = READUINT32(save_p);
|
||||||
players[i].thokitem = (mobjtype_t)READUINT32(save_p);
|
|
||||||
players[i].spinitem = (mobjtype_t)READUINT32(save_p);
|
|
||||||
players[i].revitem = (mobjtype_t)READUINT32(save_p);
|
|
||||||
players[i].actionspd = READFIXED(save_p);
|
|
||||||
players[i].mindash = READFIXED(save_p);
|
|
||||||
players[i].maxdash = READFIXED(save_p);
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
players[i].kartspeed = READUINT8(save_p);
|
players[i].kartspeed = READUINT8(save_p);
|
||||||
players[i].kartweight = READUINT8(save_p);
|
players[i].kartweight = READUINT8(save_p);
|
||||||
//
|
//
|
||||||
players[i].normalspeed = READFIXED(save_p);
|
|
||||||
players[i].runspeed = READFIXED(save_p);
|
|
||||||
players[i].thrustfactor = READUINT8(save_p);
|
|
||||||
players[i].accelstart = READUINT8(save_p);
|
|
||||||
players[i].acceleration = READUINT8(save_p);
|
|
||||||
players[i].jumpfactor = READFIXED(save_p);
|
|
||||||
|
|
||||||
for (j = 0; j < MAXPREDICTTICS; j++)
|
for (j = 0; j < MAXPREDICTTICS; j++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
36
src/p_user.c
36
src/p_user.c
|
|
@ -1960,13 +1960,13 @@ static void P_CheckBustableBlocks(player_t *player)
|
||||||
// ...or are drilling in NiGHTS (or Metal Sonic)
|
// ...or are drilling in NiGHTS (or Metal Sonic)
|
||||||
if (!(rover->flags & FF_SHATTER) && !(rover->flags & FF_SPINBUST)
|
if (!(rover->flags & FF_SHATTER) && !(rover->flags & FF_SPINBUST)
|
||||||
&& !((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED))
|
&& !((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED))
|
||||||
&& (player->charability != CA_GLIDEANDCLIMB && !player->powers[pw_super])
|
&& (/*player->charability != CA_GLIDEANDCLIMB &&*/ !player->powers[pw_super])
|
||||||
&& !(player->pflags & PF_DRILLING) && !metalrecording)
|
&& !(player->pflags & PF_DRILLING) && !metalrecording)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Only Knuckles can break this rock...
|
// Only Knuckles can break this rock...
|
||||||
if (!(rover->flags & FF_SHATTER) && (rover->flags & FF_ONLYKNUX) && !(player->charability == CA_GLIDEANDCLIMB))
|
/*if (!(rover->flags & FF_SHATTER) && (rover->flags & FF_ONLYKNUX) && !(player->charability == CA_GLIDEANDCLIMB))
|
||||||
continue;
|
continue;*/
|
||||||
|
|
||||||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||||
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||||
|
|
@ -2468,7 +2468,7 @@ static void P_DoBubbleBreath(player_t *player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Tails stirs up the water while flying in it
|
// Tails stirs up the water while flying in it
|
||||||
if (player->powers[pw_tailsfly] && (leveltime & 1) && player->charability != CA_SWIM)
|
/*if (player->powers[pw_tailsfly] && (leveltime & 1) && player->charability != CA_SWIM)
|
||||||
{
|
{
|
||||||
fixed_t radius = (3*player->mo->radius)>>1;
|
fixed_t radius = (3*player->mo->radius)>>1;
|
||||||
angle_t fa = ((leveltime%45)*FINEANGLES/8) & FINEMASK;
|
angle_t fa = ((leveltime%45)*FINEANGLES/8) & FINEMASK;
|
||||||
|
|
@ -2494,7 +2494,7 @@ static void P_DoBubbleBreath(player_t *player)
|
||||||
stirwaterz, MT_SMALLBUBBLE);
|
stirwaterz, MT_SMALLBUBBLE);
|
||||||
bubble->destscale = player->mo->scale;
|
bubble->destscale = player->mo->scale;
|
||||||
P_SetScale(bubble,bubble->destscale);
|
P_SetScale(bubble,bubble->destscale);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -3718,13 +3718,13 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
||||||
else if (player->mo->eflags & MFE_GOOWATER)
|
else if (player->mo->eflags & MFE_GOOWATER)
|
||||||
{
|
{
|
||||||
player->mo->momz = 7*FRACUNIT;
|
player->mo->momz = 7*FRACUNIT;
|
||||||
if (player->charability == CA_JUMPBOOST && onground)
|
/*if (player->charability == CA_JUMPBOOST && onground)
|
||||||
{
|
{
|
||||||
if (player->charability2 == CA2_MULTIABILITY)
|
if (player->charability2 == CA2_MULTIABILITY)
|
||||||
player->mo->momz += FixedMul(FRACUNIT/4, dist6);
|
player->mo->momz += FixedMul(FRACUNIT/4, dist6);
|
||||||
else
|
else
|
||||||
player->mo->momz += FixedMul(FRACUNIT/8, dist6);
|
player->mo->momz += FixedMul(FRACUNIT/8, dist6);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else if (maptol & TOL_NIGHTS)
|
else if (maptol & TOL_NIGHTS)
|
||||||
player->mo->momz = 24*FRACUNIT;
|
player->mo->momz = 24*FRACUNIT;
|
||||||
|
|
@ -4029,7 +4029,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (!LUAh_JumpSpinSpecial(player))
|
if (!LUAh_JumpSpinSpecial(player))
|
||||||
#endif
|
#endif
|
||||||
switch (player->charability)
|
/*switch (player->charability)
|
||||||
{
|
{
|
||||||
case CA_TELEKINESIS:
|
case CA_TELEKINESIS:
|
||||||
if (player->pflags & PF_JUMPED)
|
if (player->pflags & PF_JUMPED)
|
||||||
|
|
@ -4054,11 +4054,11 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->charability == CA_AIRDRILL)
|
/*if (player->charability == CA_AIRDRILL)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_JUMPED)
|
if (player->pflags & PF_JUMPED)
|
||||||
{
|
{
|
||||||
|
|
@ -4076,7 +4076,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
P_InstaThrust(player->mo, player->mo->angle, ((FixedMul(player->normalspeed - player->actionspd/4, player->mo->scale))*2)/3);
|
P_InstaThrust(player->mo, player->mo->angle, ((FixedMul(player->normalspeed - player->actionspd/4, player->mo->scale))*2)/3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (cmd->buttons & BT_DRIFT && !player->exiting && !P_PlayerInPain(player))
|
if (cmd->buttons & BT_DRIFT && !player->exiting && !P_PlayerInPain(player))
|
||||||
{
|
{
|
||||||
|
|
@ -4299,7 +4299,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
if (player->secondjump == 1)
|
if (player->secondjump == 1)
|
||||||
{
|
{
|
||||||
if (player->charability == CA_FLOAT)
|
/*if (player->charability == CA_FLOAT)
|
||||||
player->mo->momz = 0;
|
player->mo->momz = 0;
|
||||||
else if (player->charability == CA_SLOWFALL)
|
else if (player->charability == CA_SLOWFALL)
|
||||||
{
|
{
|
||||||
|
|
@ -4310,7 +4310,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
else if (P_MobjFlip(player->mo)*player->mo->momz < -gravity*4)
|
else if (P_MobjFlip(player->mo)*player->mo->momz < -gravity*4)
|
||||||
player->mo->momz = P_MobjFlip(player->mo)*-gravity*4;
|
player->mo->momz = P_MobjFlip(player->mo)*-gravity*4;
|
||||||
}
|
}*/
|
||||||
player->pflags &= ~PF_SPINNING;
|
player->pflags &= ~PF_SPINNING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4320,11 +4320,11 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
player->pflags &= ~PF_JUMPDOWN;
|
player->pflags &= ~PF_JUMPDOWN;
|
||||||
|
|
||||||
// Repeat abilities, but not double jump!
|
// Repeat abilities, but not double jump!
|
||||||
if ((player->charability2 == CA2_MULTIABILITY && player->charability != CA_DOUBLEJUMP)
|
/*if ((player->charability2 == CA2_MULTIABILITY && player->charability != CA_DOUBLEJUMP)
|
||||||
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
else if (player->charability == CA_FLOAT && player->secondjump == 1)
|
else if (player->charability == CA_FLOAT && player->secondjump == 1)
|
||||||
player->secondjump = 2;
|
player->secondjump = 2;*/
|
||||||
|
|
||||||
|
|
||||||
// If letting go of the jump button while still on ascent, cut the jump height.
|
// If letting go of the jump button while still on ascent, cut the jump height.
|
||||||
|
|
@ -6545,7 +6545,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
else if (player->dashspeed > 0 && player->dashspeed < FixedMul(player->mindash, player->mo->scale))
|
else if (player->dashspeed > 0 && player->dashspeed < FixedMul(player->mindash, player->mo->scale))
|
||||||
player->dashspeed = FixedMul(player->mindash, player->mo->scale);
|
player->dashspeed = FixedMul(player->mindash, player->mo->scale);
|
||||||
|
|
||||||
if (!(player->charability == CA_GLIDEANDCLIMB) || player->gotflag) // If you can't glide, then why the heck would you be gliding?
|
if (/*!(player->charability == CA_GLIDEANDCLIMB) ||*/ player->gotflag) // If you can't glide, then why the heck would you be gliding?
|
||||||
{
|
{
|
||||||
/* // SRB2kart - ???
|
/* // SRB2kart - ???
|
||||||
if (player->pflags & PF_GLIDING || player->climbing)
|
if (player->pflags & PF_GLIDING || player->climbing)
|
||||||
|
|
@ -6854,7 +6854,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
}
|
}
|
||||||
// Otherwise, face the direction you're travelling.
|
// Otherwise, face the direction you're travelling.
|
||||||
else if (player->panim == PA_WALK || player->panim == PA_RUN || player->panim == PA_ROLL
|
else if (player->panim == PA_WALK || player->panim == PA_RUN || player->panim == PA_ROLL
|
||||||
|| (/*(player->mo->state >= &states[S_PLAY_ABL1] && player->mo->state <= &states[S_PLAY_SPC4]) && */player->charability == CA_FLY)) // SRB2kart - idk
|
/*|| ((player->mo->state >= &states[S_PLAY_ABL1] && player->mo->state <= &states[S_PLAY_SPC4]) && player->charability == CA_FLY)*/) // SRB2kart - idk
|
||||||
player->mo->angle = R_PointToAngle2(0, 0, player->rmomx, player->rmomy);
|
player->mo->angle = R_PointToAngle2(0, 0, player->rmomx, player->rmomy);
|
||||||
|
|
||||||
// Update the local angle control.
|
// Update the local angle control.
|
||||||
|
|
@ -9090,7 +9090,7 @@ void P_PlayerThink(player_t *player)
|
||||||
|| (player->spectator || player->powers[pw_flashing] < K_GetKartFlashing(player))))
|
|| (player->spectator || player->powers[pw_flashing] < K_GetKartFlashing(player))))
|
||||||
player->powers[pw_flashing]--;
|
player->powers[pw_flashing]--;
|
||||||
|
|
||||||
if (player->powers[pw_tailsfly] && player->powers[pw_tailsfly] < UINT16_MAX && player->charability != CA_SWIM && !(player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]))) // tails fly counter
|
if (player->powers[pw_tailsfly] && player->powers[pw_tailsfly] < UINT16_MAX /*&& player->charability != CA_SWIM*/ && !(player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]))) // tails fly counter
|
||||||
player->powers[pw_tailsfly]--;
|
player->powers[pw_tailsfly]--;
|
||||||
|
|
||||||
/* // SRB2kart - Can't drown.
|
/* // SRB2kart - Can't drown.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue