mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 23:21:43 +00:00
- SW: Alt implementation for preparing a nuke.
* Given the original code in `pNukeAction()` (poorly named), the intent appeared to be that the weapon should go off-screen for preparation, returning once weapon initialised. * Commit restores that behaviour behind a CVAR. # Conflicts: # source/core/gamecvars.cpp # source/core/gamecvars.h
This commit is contained in:
parent
5a77aace2f
commit
4fcec5f6d3
3 changed files with 38 additions and 3 deletions
|
@ -90,7 +90,8 @@ CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolati
|
|||
CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood
|
||||
CVARD(Int, cl_showweapon, 1, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood
|
||||
CVARD(Bool, cl_sointerpolation, true, CVAR_ARCHIVE, "enable/disable sector object interpolation") // only implemented in SW
|
||||
CVARD(Bool, cl_syncinput, false, CVAR_ARCHIVE, "enable/disable synchronized input with game's ticrate") // only implemented in SW
|
||||
CVARD(Bool, cl_syncinput, false, CVAR_ARCHIVE, "enable/disable synchronized input with game's ticrate") // only implemented in Duke
|
||||
CVARD(Bool, cl_swaltnukeinit, false, CVAR_ARCHIVE, "enable/disable SW alternative nuke initialisation") // only implemented in SW
|
||||
CVARD(Bool, cl_dukefixrpgrecoil, true, CVAR_ARCHIVE, "soften recoil of Duke 3D's RPG")
|
||||
CVARD(Bool, cl_smoothsway, true, CVAR_ARCHIVE, "move SW weapon left and right smoothly while bobbing")
|
||||
CUSTOM_CVARD(Int, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair")
|
||||
|
|
|
@ -25,6 +25,7 @@ EXTERN_CVAR(Int, cl_weaponswitch)
|
|||
EXTERN_CVAR(Int, cl_crosshairscale)
|
||||
EXTERN_CVAR(Bool, cl_sointerpolation)
|
||||
EXTERN_CVAR(Bool, cl_syncinput)
|
||||
EXTERN_CVAR(Bool, cl_swaltnukeinit)
|
||||
EXTERN_CVAR(Bool, cl_dukefixrpgrecoil)
|
||||
EXTERN_CVAR(Bool, cl_smoothsway)
|
||||
|
||||
|
|
|
@ -4066,6 +4066,7 @@ void pMicroStandBy(PANEL_SPRITEp psp);
|
|||
void pMicroCount(PANEL_SPRITEp psp);
|
||||
void pMicroReady(PANEL_SPRITEp psp);
|
||||
void pNukeAction(PANEL_SPRITEp psp);
|
||||
void pMicroInitNukeAlt(PANEL_SPRITEp psp);
|
||||
|
||||
extern PANEL_STATE ps_MicroReload[];
|
||||
|
||||
|
@ -4099,6 +4100,17 @@ PANEL_STATE ps_InitNuke[] =
|
|||
{ID_MicroPresent0, 3, pNukeAction, &ps_MicroRest[0], 0,0,0}
|
||||
};
|
||||
|
||||
PANEL_STATE ps_InitNukeAlt[] =
|
||||
{
|
||||
{ID_MicroPresent0, Micro_REST_RATE, pMicroInitNukeAlt, &ps_InitNukeAlt[1], 0,0,0},
|
||||
{ID_MicroPresent0, 0, pMicroStandBy, &ps_InitNukeAlt[2], psf_QuickCall, 0,0},
|
||||
{ID_MicroPresent0, 120*2, pMicroAction, &ps_InitNukeAlt[3], 0,0,0},
|
||||
{ID_MicroPresent0, 0, pMicroCount, &ps_InitNukeAlt[4], psf_QuickCall, 0,0},
|
||||
{ID_MicroPresent0, 120*3, pMicroAction, &ps_InitNukeAlt[5], 0,0,0},
|
||||
{ID_MicroPresent0, 0, pMicroReady, &ps_InitNukeAlt[6], psf_QuickCall, 0,0},
|
||||
{ID_MicroPresent0, 120 + 60, pMicroAction, &ps_PresentMicro[0], 0,0,0}
|
||||
};
|
||||
|
||||
PANEL_STATE ps_MicroRecoil[] =
|
||||
{
|
||||
// recoil
|
||||
|
@ -4187,7 +4199,7 @@ InitWeaponMicro(PLAYERp pp)
|
|||
pp->TestNukeInit = FALSE;
|
||||
pp->InitingNuke = TRUE;
|
||||
psp = pp->Wpn[WPN_MICRO];
|
||||
pSetState(psp, ps_InitNuke);
|
||||
pSetState(psp, !cl_swaltnukeinit ? ps_InitNuke : ps_InitNukeAlt);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -4299,7 +4311,7 @@ pMicroPresent(PANEL_SPRITEp psp)
|
|||
if (pp->WpnRocketType == 2 && !pp->NukeInitialized)
|
||||
{
|
||||
pp->TestNukeInit = FALSE;
|
||||
pSetState(psp, ps_InitNuke);
|
||||
pSetState(psp, !cl_swaltnukeinit ? ps_InitNuke : ps_InitNukeAlt);
|
||||
}
|
||||
else
|
||||
pSetState(psp, psp->RestState);
|
||||
|
@ -4569,13 +4581,29 @@ pNukeAction(PANEL_SPRITEp psp)
|
|||
pSetState(psp, psp->PresentState);
|
||||
}
|
||||
|
||||
void
|
||||
pMicroInitNukeAlt(PANEL_SPRITEp psp)
|
||||
{
|
||||
PLAYERp pp = psp->PlayerP;
|
||||
|
||||
psp->oy = psp->y;
|
||||
psp->y += 2 * synctics;
|
||||
|
||||
pMicroAction(psp);
|
||||
}
|
||||
|
||||
void
|
||||
pMicroStandBy(PANEL_SPRITEp psp)
|
||||
{
|
||||
PLAYERp pp = psp->PlayerP;
|
||||
|
||||
psp->ox = psp->x;
|
||||
psp->oy = psp->y;
|
||||
|
||||
pMicroOverlays(psp);
|
||||
PlaySound(DIGI_NUKESTDBY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON);
|
||||
|
||||
pMicroAction(psp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4584,6 +4612,8 @@ pMicroCount(PANEL_SPRITEp psp)
|
|||
PLAYERp pp = psp->PlayerP;
|
||||
|
||||
PlaySound(DIGI_NUKECDOWN, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON);
|
||||
|
||||
pMicroAction(psp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4593,6 +4623,8 @@ pMicroReady(PANEL_SPRITEp psp)
|
|||
|
||||
PlaySound(DIGI_NUKEREADY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON);
|
||||
pp->NukeInitialized = TRUE;
|
||||
|
||||
pMicroAction(psp);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -7365,6 +7397,7 @@ static saveable_data saveable_panel_data[] =
|
|||
SAVE_DATA(ps_MicroRest),
|
||||
SAVE_DATA(ps_MicroHide),
|
||||
SAVE_DATA(ps_InitNuke),
|
||||
SAVE_DATA(ps_InitNukeAlt),
|
||||
SAVE_DATA(ps_MicroRecoil),
|
||||
SAVE_DATA(ps_MicroFire),
|
||||
SAVE_DATA(ps_MicroSingleFire),
|
||||
|
|
Loading…
Reference in a new issue