mirror of
https://github.com/DrBeef/Doom3Quest.git
synced 2024-11-10 06:41:36 +00:00
Save System + Extras
Save Version above Vanilla (+ default Load) Fixed issue with empty being confused with fists (allowing two handed punches)
This commit is contained in:
parent
d2b5dc5046
commit
14f907192e
6 changed files with 37 additions and 11 deletions
|
@ -93,7 +93,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// NOTE: a seperate core savegame version and game savegame version could be useful
|
||||
// 16: Doom v1.1
|
||||
// 17: Doom v1.2 / D3XP. Can still read old v16 with defaults for new data
|
||||
#define SAVEGAME_VERSION 17
|
||||
// 18: Doom3Quest v1.0
|
||||
#define SAVEGAME_VERSION 18
|
||||
|
||||
// <= Doom v1.1: 1. no DS_VERSION token ( default )
|
||||
// Doom v1.2: 2
|
||||
|
|
|
@ -2120,9 +2120,8 @@ bool idSessionLocal::LoadGame( const char *saveName ) {
|
|||
// check the version, if it doesn't match, cancel the loadgame,
|
||||
// but still load the map with the persistant playerInfo from the header
|
||||
// so that the player doesn't lose too much progress.
|
||||
if ( savegameVersion != SAVEGAME_VERSION &&
|
||||
!( savegameVersion == 16 && SAVEGAME_VERSION == 17 ) ) { // handle savegame v16 in v17
|
||||
common->Warning( "Savegame Version mismatch: aborting loadgame and starting level with persistent data" );
|
||||
if ( savegameVersion <= 17) { // handle savegame v16 in v17
|
||||
common->Warning( "Savegame Version Too Early: aborting loadgame and starting level with persistent data" );
|
||||
loadingSaveGame = false;
|
||||
fileSystem->CloseFile( savegameFile );
|
||||
savegameFile = NULL;
|
||||
|
@ -2570,7 +2569,7 @@ int calcFPS( ) {
|
|||
fps = 10000 * FPS_FRAMES / total;
|
||||
fps = (fps + 5) / 10;
|
||||
|
||||
common->Printf( " FPS: %i ", fps );
|
||||
//common->Printf( " FPS: %i ", fps );
|
||||
}
|
||||
|
||||
return fps;
|
||||
|
@ -2776,9 +2775,9 @@ void idSessionLocal::Frame() {
|
|||
|
||||
// create client commands, which will be sent directly
|
||||
// to the game
|
||||
if ( com_showTics.GetBool() ) {
|
||||
/*if ( com_showTics.GetBool() ) {
|
||||
common->Printf( " Tics to run: %i ", latchedTicNumber - lastGameTic );
|
||||
}
|
||||
}*/
|
||||
|
||||
int gameTicsToRun = latchedTicNumber - lastGameTic;
|
||||
|
||||
|
|
|
@ -1303,6 +1303,25 @@ idPlayer::idPlayer() {
|
|||
weapon_pda = -1;
|
||||
weapon_fists = -1;
|
||||
weapon_chainsaw = -1;
|
||||
weapon_none = -1;
|
||||
weapon_flashlight = -1;
|
||||
weapon_bloodstone = -1;
|
||||
weapon_bloodstone_active1 = -1;
|
||||
weapon_bloodstone_active2 = -1;
|
||||
weapon_bloodstone_active3 = -1;
|
||||
// Koz begin
|
||||
weapon_pistol = -1;
|
||||
weapon_shotgun = -1;
|
||||
weapon_shotgun_double = -1;
|
||||
weapon_machinegun = -1;
|
||||
weapon_chaingun = -1;
|
||||
weapon_handgrenade = -1;
|
||||
weapon_plasmagun = -1;
|
||||
weapon_rocketlauncher = -1;
|
||||
weapon_bfg = -1;
|
||||
weapon_flashlight_new = -1;
|
||||
weapon_grabber = -1;
|
||||
|
||||
showWeaponViewModel = true;
|
||||
|
||||
flashlightModelDefHandle = -1;
|
||||
|
@ -1563,6 +1582,7 @@ void idPlayer::Init( void ) {
|
|||
|
||||
weaponEnabled = true;
|
||||
risingWeaponHand = -1;
|
||||
weapon_none = 0;
|
||||
weapon_soulcube = SlotForWeapon( "weapon_soulcube" );
|
||||
weapon_pda = SlotForWeapon( "weapon_pda" );
|
||||
weapon_fists = SlotForWeapon( "weapon_fists" );
|
||||
|
@ -2533,7 +2553,7 @@ void idPlayer::Restore( idRestoreGame *savefile ) {
|
|||
savefile->ReadUserInterface(objectiveSystem);
|
||||
savefile->ReadBool(objectiveSystemOpen);
|
||||
|
||||
|
||||
weapon_none = 0;
|
||||
savefile->ReadInt( weapon_soulcube );
|
||||
savefile->ReadInt( weapon_pda );
|
||||
savefile->ReadInt( weapon_fists );
|
||||
|
@ -11528,7 +11548,11 @@ void idPlayer::Think( void ) {
|
|||
pVRClientInfo->weaponid = -1;
|
||||
}
|
||||
cvarSystem->SetCVarBool("vr_weapon_stabilised", pVRClientInfo->weapon_stabilised);
|
||||
pVRClientInfo->velocitytriggered = GetCurrentWeaponId() == WEAPON_FLASHLIGHT;
|
||||
int _currentWeapon = GetCurrentWeaponId();
|
||||
if(_currentWeapon == WEAPON_FLASHLIGHT || _currentWeapon == WEAPON_FISTS)
|
||||
pVRClientInfo->velocitytriggered = true;
|
||||
else
|
||||
pVRClientInfo->velocitytriggered = false;
|
||||
pVRClientInfo->velocitytriggeredoffhand = true;
|
||||
pVRClientInfo->pistol = GetCurrentWeaponId() == WEAPON_PISTOL;
|
||||
}
|
||||
|
@ -13423,7 +13447,7 @@ void idPlayer::CalculateViewWeaponPosVR( int hand, idVec3 &origin, idMat3 &axis
|
|||
|
||||
bool idPlayer::CanDualWield( int num ) const
|
||||
{
|
||||
if( num == weapon_flashlight || num == weapon_flashlight_new )
|
||||
if( num == weapon_flashlight || num == weapon_flashlight_new || num == weapon_fists || num == -1)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
|
|
|
@ -566,6 +566,8 @@ public:
|
|||
|
||||
vrClientInfo *pVRClientInfo;
|
||||
|
||||
//Gb added this to match upto the enums
|
||||
int weapon_none;
|
||||
int weapon_soulcube;
|
||||
int weapon_pda;
|
||||
int weapon_fists;
|
||||
|
|
|
@ -56,7 +56,7 @@ typedef enum {
|
|||
} weaponStatus_t;
|
||||
|
||||
typedef enum { // Koz weapon enumerations
|
||||
WEAPON_NONE = 0,
|
||||
WEAPON_NONE = -1,
|
||||
WEAPON_FISTS,
|
||||
WEAPON_CHAINSAW,
|
||||
WEAPON_PISTOL,
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue