mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 01:01:43 +00:00
Fix my fuckups
Not fond of what I did in P_CanRunOnWater but it at least carries the desired effect...
This commit is contained in:
parent
87d60eef86
commit
a181cd24cd
7 changed files with 5 additions and 166 deletions
|
@ -38,7 +38,6 @@ typedef enum
|
|||
SF_HIRES = 1<<3, // Draw the sprite 2x as small?
|
||||
SF_NOSKID = 1<<4, // No skid particles etc
|
||||
SF_NOSPEEDADJUST = 1<<5, // Skin-specific version of disablespeedadjust
|
||||
//SF_RUNONWATER = 1<<6, // Run on top of water FOFs?
|
||||
} skinflags_t;
|
||||
|
||||
//Primary and secondary skin abilities
|
||||
|
|
|
@ -8614,7 +8614,6 @@ struct {
|
|||
{"SF_HIRES",SF_HIRES},
|
||||
{"SF_NOSKID",SF_NOSKID},
|
||||
{"SF_NOSPEEDADJUST",SF_NOSPEEDADJUST},
|
||||
//{"SF_RUNONWATER",SF_RUNONWATER},
|
||||
|
||||
// Character abilities!
|
||||
// Primary
|
||||
|
|
|
@ -5113,17 +5113,16 @@ void G_GhostTicker(void)
|
|||
INT32 type = -1;
|
||||
if (g->mo->skin)
|
||||
{
|
||||
//skin_t *skin = (skin_t *)g->mo->skin;
|
||||
switch (ziptic & EZT_THOKMASK)
|
||||
{
|
||||
case EZT_THOK:
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].painchance; // skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].painchance;
|
||||
break;
|
||||
case EZT_SPIN:
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].damage; // skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].damage;
|
||||
break;
|
||||
case EZT_REV:
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].raisestate; // skin->revitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].raisestate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,24 +30,10 @@ enum skin {
|
|||
skin_facerank,
|
||||
skin_facewant,
|
||||
skin_facemmap,
|
||||
/*skin_ability,
|
||||
skin_ability2,
|
||||
skin_thokitem,
|
||||
skin_spinitem,
|
||||
skin_revitem,
|
||||
skin_actionspd,
|
||||
skin_mindash,
|
||||
skin_maxdash,*/
|
||||
// SRB2kart
|
||||
skin_kartspeed,
|
||||
skin_kartweight,
|
||||
//
|
||||
/*skin_normalspeed,
|
||||
skin_runspeed,
|
||||
skin_thrustfactor,
|
||||
skin_accelstart,
|
||||
skin_acceleration,
|
||||
skin_jumpfactor,*/
|
||||
skin_starttranscolor,
|
||||
skin_prefcolor,
|
||||
skin_highresscale,
|
||||
|
@ -64,24 +50,10 @@ static const char *const skin_opt[] = {
|
|||
"facerank",
|
||||
"facewant",
|
||||
"facemmap",
|
||||
/*"ability",
|
||||
"ability2",
|
||||
"thokitem",
|
||||
"spinitem",
|
||||
"revitem",
|
||||
"actionspd",
|
||||
"mindash",
|
||||
"maxdash",*/
|
||||
// SRB2kart
|
||||
"kartspeed",
|
||||
"kartweight",
|
||||
//
|
||||
/*"normalspeed",
|
||||
"runspeed",
|
||||
"thrustfactor",
|
||||
"accelstart",
|
||||
"acceleration",
|
||||
"jumpfactor",*/
|
||||
"starttranscolor",
|
||||
"prefcolor",
|
||||
"highresscale",
|
||||
|
@ -139,30 +111,6 @@ static int skin_get(lua_State *L)
|
|||
break;
|
||||
lua_pushlstring(L, skin->facemmap, i);
|
||||
break;
|
||||
/*case skin_ability:
|
||||
lua_pushinteger(L, skin->ability);
|
||||
break;
|
||||
case skin_ability2:
|
||||
lua_pushinteger(L, skin->ability2);
|
||||
break;
|
||||
case skin_thokitem:
|
||||
lua_pushinteger(L, skin->thokitem);
|
||||
break;
|
||||
case skin_spinitem:
|
||||
lua_pushinteger(L, skin->spinitem);
|
||||
break;
|
||||
case skin_revitem:
|
||||
lua_pushinteger(L, skin->revitem);
|
||||
break;
|
||||
case skin_actionspd:
|
||||
lua_pushfixed(L, skin->actionspd);
|
||||
break;
|
||||
case skin_mindash:
|
||||
lua_pushfixed(L, skin->mindash);
|
||||
break;
|
||||
case skin_maxdash:
|
||||
lua_pushfixed(L, skin->maxdash);
|
||||
break;*/
|
||||
// SRB2kart
|
||||
case skin_kartspeed:
|
||||
lua_pushinteger(L, skin->kartspeed);
|
||||
|
@ -171,24 +119,6 @@ static int skin_get(lua_State *L)
|
|||
lua_pushinteger(L, skin->kartweight);
|
||||
break;
|
||||
//
|
||||
/*case skin_normalspeed:
|
||||
lua_pushfixed(L, skin->normalspeed);
|
||||
break;
|
||||
case skin_runspeed:
|
||||
lua_pushfixed(L, skin->runspeed);
|
||||
break;
|
||||
case skin_thrustfactor:
|
||||
lua_pushinteger(L, skin->thrustfactor);
|
||||
break;
|
||||
case skin_accelstart:
|
||||
lua_pushinteger(L, skin->accelstart);
|
||||
break;
|
||||
case skin_acceleration:
|
||||
lua_pushinteger(L, skin->acceleration);
|
||||
break;
|
||||
case skin_jumpfactor:
|
||||
lua_pushfixed(L, skin->jumpfactor);
|
||||
break;*/
|
||||
case skin_starttranscolor:
|
||||
lua_pushinteger(L, skin->starttranscolor);
|
||||
break;
|
||||
|
|
|
@ -3234,11 +3234,11 @@ boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
|||
#endif
|
||||
*rover->topheight;
|
||||
|
||||
if ((/*(player->charflags & SF_RUNONWATER) && */player->mo->ceilingz-topheight >= player->mo->height)
|
||||
if ((player->mo->ceilingz-topheight >= player->mo->height)
|
||||
&& (rover->flags & FF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale)
|
||||
&& !(player->pflags & PF_SLIDING)
|
||||
&& abs(player->mo->z - topheight) < FixedMul(30*FRACUNIT, player->mo->scale))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2537,23 +2537,6 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
|||
skin->kartweight = 5;
|
||||
//
|
||||
|
||||
//skin->normalspeed = 36<<FRACBITS;
|
||||
//skin->runspeed = 28<<FRACBITS;
|
||||
//skin->thrustfactor = 5;
|
||||
//skin->accelstart = 96;
|
||||
//skin->acceleration = 40;
|
||||
|
||||
//skin->ability = CA_NONE;
|
||||
//skin->ability2 = CA2_SPINDASH;
|
||||
//skin->jumpfactor = FRACUNIT;
|
||||
//skin->actionspd = 30<<FRACBITS;
|
||||
//skin->mindash = 15<<FRACBITS;
|
||||
//skin->maxdash = 90<<FRACBITS;
|
||||
|
||||
//skin->thokitem = -1;
|
||||
//skin->spinitem = -1;
|
||||
//skin->revitem = -1;
|
||||
|
||||
skin->highresscale = FRACUNIT>>1;
|
||||
|
||||
for (i = 0; i < sfx_skinsoundslot0; i++)
|
||||
|
@ -2596,20 +2579,11 @@ void R_InitSkins(void)
|
|||
strncpy(skin->facemmap, "PLAYMMAP", 9);
|
||||
skin->prefcolor = SKINCOLOR_BLUE;
|
||||
|
||||
//skin->ability = CA_THOK;
|
||||
//skin->actionspd = 60<<FRACBITS;
|
||||
|
||||
// SRB2kart
|
||||
skin->kartspeed = 8;
|
||||
skin->kartweight = 2;
|
||||
//
|
||||
|
||||
//skin->normalspeed = 36<<FRACBITS;
|
||||
//skin->runspeed = 28<<FRACBITS;
|
||||
//skin->thrustfactor = 5;
|
||||
//skin->accelstart = 96;
|
||||
//skin->acceleration = 40;
|
||||
|
||||
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
|
||||
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
||||
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, 0);
|
||||
|
@ -2673,31 +2647,12 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
if (player->mo)
|
||||
player->mo->skin = skin;
|
||||
|
||||
//player->charability = (UINT8)skin->ability;
|
||||
//player->charability2 = (UINT8)skin->ability2;
|
||||
|
||||
player->charflags = (UINT32)skin->flags;
|
||||
|
||||
//player->thokitem = skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
//player->spinitem = skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
//player->revitem = skin->revitem < 0 ? (mobjtype_t)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
|
||||
//player->actionspd = skin->actionspd;
|
||||
//player->mindash = skin->mindash;
|
||||
//player->maxdash = skin->maxdash;
|
||||
|
||||
// SRB2kart
|
||||
player->kartspeed = skin->kartspeed;
|
||||
player->kartweight = skin->kartweight;
|
||||
|
||||
//player->normalspeed = skin->normalspeed;
|
||||
//player->runspeed = skin->runspeed;
|
||||
//player->thrustfactor = skin->thrustfactor;
|
||||
//player->accelstart = skin->accelstart;
|
||||
//player->acceleration = skin->acceleration;
|
||||
|
||||
//player->jumpfactor = skin->jumpfactor;
|
||||
|
||||
/*if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback || modeattacking))
|
||||
{
|
||||
if (playernum == consoleplayer)
|
||||
|
@ -2896,28 +2851,8 @@ void R_AddSkins(UINT16 wadnum)
|
|||
#define FULLPROCESS(field) else if (!stricmp(stoken, #field)) skin->field = get_number(value);
|
||||
// character type identification
|
||||
FULLPROCESS(flags)
|
||||
//FULLPROCESS(ability)
|
||||
//FULLPROCESS(ability2)
|
||||
|
||||
//FULLPROCESS(thokitem)
|
||||
//FULLPROCESS(spinitem)
|
||||
//FULLPROCESS(revitem)
|
||||
#undef FULLPROCESS
|
||||
|
||||
#define GETSPEED(field) else if (!stricmp(stoken, #field)) skin->field = atoi(value)<<FRACBITS;
|
||||
//GETSPEED(normalspeed)
|
||||
//GETSPEED(runspeed)
|
||||
//GETSPEED(mindash)
|
||||
//GETSPEED(maxdash)
|
||||
//GETSPEED(actionspd)
|
||||
#undef GETSPEED
|
||||
|
||||
/*#define GETINT(field) else if (!stricmp(stoken, #field)) skin->field = atoi(value);
|
||||
GETINT(thrustfactor)
|
||||
GETINT(accelstart)
|
||||
GETINT(acceleration)
|
||||
#undef GETINT*/
|
||||
|
||||
#define GETKARTSTAT(field) \
|
||||
else if (!stricmp(stoken, #field)) \
|
||||
{ \
|
||||
|
@ -2935,8 +2870,6 @@ void R_AddSkins(UINT16 wadnum)
|
|||
|
||||
else if (!stricmp(stoken, "prefcolor"))
|
||||
skin->prefcolor = K_GetKartColorByName(value);
|
||||
//else if (!stricmp(stoken, "jumpfactor"))
|
||||
//skin->jumpfactor = FLOAT_TO_FIXED(atof(value));
|
||||
else if (!stricmp(stoken, "highresscale"))
|
||||
skin->highresscale = FLOAT_TO_FIXED(atof(value));
|
||||
else
|
||||
|
@ -3046,9 +2979,6 @@ next_token:
|
|||
HWR_AddPlayerMD2(numskins);
|
||||
#endif
|
||||
|
||||
/*if (skin->flags & SF_RUNONWATER) // this is literally the only way a skin can be a major mod... this might be a bit heavy handed
|
||||
G_SetGameModified(multiplayer, true);*/
|
||||
|
||||
numskins++;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -83,29 +83,11 @@ typedef struct
|
|||
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
|
||||
char facerank[9], facewant[9], facemmap[9]; // Arbitrarily named patch lumps
|
||||
|
||||
//UINT8 ability; // ability definition
|
||||
//UINT8 ability2; // secondary ability definition
|
||||
//INT32 thokitem;
|
||||
//INT32 spinitem;
|
||||
//INT32 revitem;
|
||||
//fixed_t actionspd;
|
||||
//fixed_t mindash;
|
||||
//fixed_t maxdash;
|
||||
|
||||
// SRB2kart
|
||||
UINT8 kartspeed;
|
||||
UINT8 kartweight;
|
||||
//
|
||||
|
||||
//fixed_t normalspeed; // Normal ground
|
||||
//fixed_t runspeed; // Speed that you break into your run animation
|
||||
|
||||
//UINT8 thrustfactor; // Thrust = thrustfactor * acceleration
|
||||
//UINT8 accelstart; // Acceleration if speed = 0
|
||||
//UINT8 acceleration; // Acceleration
|
||||
|
||||
//fixed_t jumpfactor; // multiple of standard jump height
|
||||
|
||||
// Definable color translation table
|
||||
UINT8 starttranscolor;
|
||||
UINT8 prefcolor;
|
||||
|
|
Loading…
Reference in a new issue