diff --git a/src/lua_skinlib.c b/src/lua_skinlib.c index 91735337d3ed335d9c9893ab064d7e6abe205e5a..7ff21151c7250c9cad3e5bf204a1cd4198700311 100644 --- a/src/lua_skinlib.c +++ b/src/lua_skinlib.c @@ -48,6 +48,7 @@ enum skin { skin_height, skin_spinheight, skin_shieldscale, + skin_camerascale, skin_starttranscolor, skin_prefcolor, skin_prefoppositecolor, @@ -84,6 +85,7 @@ static const char *const skin_opt[] = { "height", "spinheight", "shieldscale", + "camerascale", "starttranscolor", "prefcolor", "prefoppositecolor", @@ -197,6 +199,9 @@ static int skin_get(lua_State *L) case skin_shieldscale: lua_pushfixed(L, skin->shieldscale); break; + case skin_camerascale: + lua_pushfixed(L, skin->camerascale); + break; case skin_starttranscolor: lua_pushinteger(L, skin->starttranscolor); break; diff --git a/src/p_user.c b/src/p_user.c index cacf26a15de0acba11c00118164f2751830dbbd9..b85e83d78eef9595a5f5775598441b2715c84c3b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8002,16 +8002,16 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall camspeed = cv_cam_speed.value; camstill = cv_cam_still.value; camrotate = cv_cam_rotate.value; - camdist = FixedMul(cv_cam_dist.value, mo->scale); - camheight = FixedMul(cv_cam_height.value, mo->scale); + camdist = FixedMul(cv_cam_dist.value, FixedMul(skins[player->skin].camerascale, mo->scale)); + camheight = FixedMul(cv_cam_height.value, FixedMul(skins[player->skin].camerascale, mo->scale)); } else // Camera 2 { camspeed = cv_cam2_speed.value; camstill = cv_cam2_still.value; camrotate = cv_cam2_rotate.value; - camdist = FixedMul(cv_cam2_dist.value, mo->scale); - camheight = FixedMul(cv_cam2_height.value, mo->scale); + camdist = FixedMul(cv_cam2_dist.value, FixedMul(skins[player->skin].camerascale, mo->scale)); + camheight = FixedMul(cv_cam2_height.value, FixedMul(skins[player->skin].camerascale, mo->scale)); } #ifdef REDSANALOG diff --git a/src/r_things.c b/src/r_things.c index dd0cf34eff5c3157b9609d9ac8c16fed8bdca2b9..c3a7ac2719c2100bc94bc18885393211a64a276f 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2308,6 +2308,7 @@ static void Sk_SetDefaultValue(skin_t *skin) skin->spinheight = FixedMul(skin->height, 2*FRACUNIT/3); skin->shieldscale = FRACUNIT; + skin->camerascale = FRACUNIT; skin->thokitem = -1; skin->spinitem = -1; @@ -2662,6 +2663,7 @@ void R_AddSkins(UINT16 wadnum) GETFLOAT(jumpfactor) GETFLOAT(highresscale) GETFLOAT(shieldscale) + GETFLOAT(camerascale) #undef GETFLOAT else // let's check if it's a sound, otherwise error out diff --git a/src/r_things.h b/src/r_things.h index 15f9eb774b26853dc1610bcf6ba6b82830ee0943..651950f053a517f41e9592c7b91374ed6a36e65d 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -98,6 +98,7 @@ typedef struct fixed_t spinheight; fixed_t shieldscale; // no change to bounding box, but helps set the shield's sprite size + fixed_t camerascale; // Definable color translation table UINT8 starttranscolor;