mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 03:51:50 +00:00
Merge branch 'claw-determination' into 'master'
UFO determination See merge request KartKrew/Kart!2355
This commit is contained in:
commit
254cdc795f
4 changed files with 19 additions and 1 deletions
|
|
@ -4977,7 +4977,7 @@ void G_DirtyGameData(void)
|
||||||
// Can be called by the startup code or the menu task.
|
// Can be called by the startup code or the menu task.
|
||||||
//
|
//
|
||||||
|
|
||||||
#define SAV_VERSIONMINOR 5
|
#define SAV_VERSIONMINOR 6
|
||||||
|
|
||||||
void G_LoadGame(void)
|
void G_LoadGame(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ extern struct grandprixinfo
|
||||||
boolean initalize; ///< If true, we need to initialize a new session.
|
boolean initalize; ///< If true, we need to initialize a new session.
|
||||||
boolean wonround; ///< If false, then we retry the map instead of going to the next.
|
boolean wonround; ///< If false, then we retry the map instead of going to the next.
|
||||||
gpEvent_e eventmode; ///< Special event mode, bots are set to spectate and a special gametype is played
|
gpEvent_e eventmode; ///< Special event mode, bots are set to spectate and a special gametype is played
|
||||||
|
UINT32 specialDamage; ///< Accumulated Sealed Star difficulty reduction
|
||||||
gpRank_t rank; ///< Struct containing grading information. (See also: k_rank.h)
|
gpRank_t rank; ///< Struct containing grading information. (See also: k_rank.h)
|
||||||
} grandprixinfo;
|
} grandprixinfo;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include "../k_hitlag.h"
|
#include "../k_hitlag.h"
|
||||||
#include "../acs/interface.h"
|
#include "../acs/interface.h"
|
||||||
#include "../hu_stuff.h"
|
#include "../hu_stuff.h"
|
||||||
|
#include "../k_grandprix.h"
|
||||||
|
|
||||||
#define UFO_BASE_SPEED (42 * FRACUNIT) // UFO's slowest speed.
|
#define UFO_BASE_SPEED (42 * FRACUNIT) // UFO's slowest speed.
|
||||||
#define UFO_SPEEDUP (FRACUNIT >> 1) // Acceleration
|
#define UFO_SPEEDUP (FRACUNIT >> 1) // Acceleration
|
||||||
|
|
@ -935,6 +936,11 @@ boolean Obj_SpecialUFODamage(mobj_t *ufo, mobj_t *inflictor, mobj_t *source, UIN
|
||||||
|
|
||||||
ufo->health = max(1, ufo->health - damage);
|
ufo->health = max(1, ufo->health - damage);
|
||||||
|
|
||||||
|
if (grandprixinfo.gp)
|
||||||
|
{
|
||||||
|
grandprixinfo.specialDamage += damage;
|
||||||
|
}
|
||||||
|
|
||||||
K_SetHitLagForObjects(ufo, inflictor, source, (damage / 3) + 2, true);
|
K_SetHitLagForObjects(ufo, inflictor, source, (damage / 3) + 2, true);
|
||||||
UFOCopyHitlagToPieces(ufo);
|
UFOCopyHitlagToPieces(ufo);
|
||||||
|
|
||||||
|
|
@ -1339,6 +1345,11 @@ static mobj_t *InitSpecialUFO(waypoint_t *start)
|
||||||
P_SetTarget(&ufo_piece_prev(piece), prevPiece);
|
P_SetTarget(&ufo_piece_prev(piece), prevPiece);
|
||||||
prevPiece = piece;
|
prevPiece = piece;
|
||||||
|
|
||||||
|
if (grandprixinfo.gp && grandprixinfo.specialDamage)
|
||||||
|
{
|
||||||
|
ufo->health -= min(4*mobjinfo[MT_SPECIAL_UFO].spawnhealth/10, grandprixinfo.specialDamage/6);
|
||||||
|
}
|
||||||
|
|
||||||
return ufo;
|
return ufo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6071,6 +6071,8 @@ static inline void P_ArchiveMisc(savebuffer_t *save)
|
||||||
WRITEUINT8(save->p, (UINT8)grandprixinfo.encore);
|
WRITEUINT8(save->p, (UINT8)grandprixinfo.encore);
|
||||||
WRITEUINT8(save->p, (UINT8)grandprixinfo.masterbots);
|
WRITEUINT8(save->p, (UINT8)grandprixinfo.masterbots);
|
||||||
|
|
||||||
|
WRITEUINT32(save->p, grandprixinfo.specialDamage);
|
||||||
|
|
||||||
WRITESTRINGL(save->p, grandprixinfo.cup->name, MAXCUPNAME);
|
WRITESTRINGL(save->p, grandprixinfo.cup->name, MAXCUPNAME);
|
||||||
|
|
||||||
// Round Queue information
|
// Round Queue information
|
||||||
|
|
@ -6218,6 +6220,8 @@ void P_GetBackupCupData(savebuffer_t *save)
|
||||||
cupsavedata.encore = (boolean)READUINT8(save->p);
|
cupsavedata.encore = (boolean)READUINT8(save->p);
|
||||||
boolean masterbots = (boolean)READUINT8(save->p);
|
boolean masterbots = (boolean)READUINT8(save->p);
|
||||||
|
|
||||||
|
save->p += 4; // specialDamage
|
||||||
|
|
||||||
if (masterbots == true)
|
if (masterbots == true)
|
||||||
cupsavedata.difficulty = KARTGP_MASTER;
|
cupsavedata.difficulty = KARTGP_MASTER;
|
||||||
|
|
||||||
|
|
@ -6267,6 +6271,8 @@ static boolean P_UnArchiveSPGame(savebuffer_t *save)
|
||||||
grandprixinfo.encore = (boolean)READUINT8(save->p);
|
grandprixinfo.encore = (boolean)READUINT8(save->p);
|
||||||
grandprixinfo.masterbots = (boolean)READUINT8(save->p);
|
grandprixinfo.masterbots = (boolean)READUINT8(save->p);
|
||||||
|
|
||||||
|
grandprixinfo.specialDamage = READUINT32(save->p);
|
||||||
|
|
||||||
// Find the relevant cup.
|
// Find the relevant cup.
|
||||||
char cupname[MAXCUPNAME];
|
char cupname[MAXCUPNAME];
|
||||||
READSTRINGL(save->p, cupname, sizeof(cupname));
|
READSTRINGL(save->p, cupname, sizeof(cupname));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue