mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Minor fixes to g_demo
This commit is contained in:
parent
bca2e508ed
commit
bb988d1dd3
3 changed files with 15 additions and 18 deletions
20
src/g_demo.c
20
src/g_demo.c
|
|
@ -39,9 +39,12 @@
|
||||||
#include "lua_hook.h"
|
#include "lua_hook.h"
|
||||||
#include "md5.h" // demo checksums
|
#include "md5.h" // demo checksums
|
||||||
|
|
||||||
#include "dehacked.h" // get_number (for ghost thok)
|
// SRB2Kart
|
||||||
#include "lua_script.h" // LUA_ArchiveDemo and LUA_UnArchiveDemo
|
#include "lua_script.h" // LUA_ArchiveDemo and LUA_UnArchiveDemo
|
||||||
|
|
||||||
|
#include "k_kart.h"
|
||||||
|
#include "k_battle.h"
|
||||||
|
|
||||||
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
|
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
|
||||||
consvar_t cv_recordmultiplayerdemos = {"netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_recordmultiplayerdemos = {"netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
|
@ -54,7 +57,8 @@ tic_t demostarttime; // for comparative timing purposes
|
||||||
|
|
||||||
static char demoname[128];
|
static char demoname[128];
|
||||||
static UINT8 *demobuffer = NULL;
|
static UINT8 *demobuffer = NULL;
|
||||||
static UINT8 *demo_p, *demotime_p;
|
static UINT8 *demotime_p, *demoinfo_p;
|
||||||
|
UINT8 *demo_p;
|
||||||
static UINT8 *demoend;
|
static UINT8 *demoend;
|
||||||
static UINT8 demoflags;
|
static UINT8 demoflags;
|
||||||
boolean demosynced = true; // console warning message
|
boolean demosynced = true; // console warning message
|
||||||
|
|
@ -89,14 +93,6 @@ static struct {
|
||||||
|
|
||||||
// Your naming conventions are stupid and useless.
|
// Your naming conventions are stupid and useless.
|
||||||
// There is no conflict here.
|
// There is no conflict here.
|
||||||
typedef struct demoghost {
|
|
||||||
UINT8 checksum[16];
|
|
||||||
UINT8 *buffer, *p, fadein;
|
|
||||||
UINT16 color;
|
|
||||||
UINT16 version;
|
|
||||||
mobj_t oldmo, *mo;
|
|
||||||
struct demoghost *next;
|
|
||||||
} demoghost;
|
|
||||||
demoghost *ghosts = NULL;
|
demoghost *ghosts = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -170,7 +166,7 @@ static ticcmd_t oldcmd[MAXPLAYERS];
|
||||||
#define FZT_SCALE 0x10 // different scale to object
|
#define FZT_SCALE 0x10 // different scale to object
|
||||||
// spare FZT slots 0x20 to 0x80
|
// spare FZT slots 0x20 to 0x80
|
||||||
|
|
||||||
static mobj_t oldmetal, oldghost;
|
static mobj_t oldmetal, oldghost[MAXPLAYERS];
|
||||||
|
|
||||||
void G_SaveMetal(UINT8 **buffer)
|
void G_SaveMetal(UINT8 **buffer)
|
||||||
{
|
{
|
||||||
|
|
@ -326,7 +322,7 @@ void G_ReadDemoExtraData(void)
|
||||||
{
|
{
|
||||||
players[p].spectator = true;
|
players[p].spectator = true;
|
||||||
if (players[p].mo)
|
if (players[p].mo)
|
||||||
P_DamageMobj(players[p].mo, NULL, NULL, 10000);
|
P_DamageMobj(players[p].mo, NULL, NULL, 1, DMG_INSTAKILL);
|
||||||
else
|
else
|
||||||
players[p].playerstate = PST_REBORN;
|
players[p].playerstate = PST_REBORN;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ extern UINT8 demo_writerng;
|
||||||
#define DXD_NAME 0x04 // name changed
|
#define DXD_NAME 0x04 // name changed
|
||||||
#define DXD_COLOR 0x08 // color changed
|
#define DXD_COLOR 0x08 // color changed
|
||||||
#define DXD_PLAYSTATE 0x10 // state changed between playing, spectating, or not in-game
|
#define DXD_PLAYSTATE 0x10 // state changed between playing, spectating, or not in-game
|
||||||
|
#define DXD_FOLLOWER 0x20 // follower was changed
|
||||||
|
|
||||||
#define DXD_PST_PLAYING 0x01
|
#define DXD_PST_PLAYING 0x01
|
||||||
#define DXD_PST_SPECTATING 0x02
|
#define DXD_PST_SPECTATING 0x02
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ boolean K_OrbinautJawzCollide(mobj_t *t1, mobj_t *t2)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Player Damage
|
// Player Damage
|
||||||
P_DamageMobj(t2, t1, t1->target, 1);
|
P_DamageMobj(t2, t1, t1->target, 1, 0);
|
||||||
K_KartBouncing(t2, t1, false, false);
|
K_KartBouncing(t2, t1, false, false);
|
||||||
S_StartSound(t2, sfx_s3k7b);
|
S_StartSound(t2, sfx_s3k7b);
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ boolean K_OrbinautJawzCollide(mobj_t *t1, mobj_t *t2)
|
||||||
else if (t2->flags & MF_SHOOTABLE)
|
else if (t2->flags & MF_SHOOTABLE)
|
||||||
{
|
{
|
||||||
// Shootable damage
|
// Shootable damage
|
||||||
P_DamageMobj(t2, t2, t1->target, 1);
|
P_DamageMobj(t2, t1, t1->target, 1, 0);
|
||||||
damageitem = true;
|
damageitem = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +177,7 @@ boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2)
|
||||||
else if (t2->flags & MF_SHOOTABLE)
|
else if (t2->flags & MF_SHOOTABLE)
|
||||||
{
|
{
|
||||||
// Shootable damage
|
// Shootable damage
|
||||||
P_DamageMobj(t2, t2, t1->target, 1);
|
P_DamageMobj(t2, t1, t1->target, 1, 0);
|
||||||
damageitem = true;
|
damageitem = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -316,7 +316,7 @@ boolean K_MineCollide(mobj_t *t1, mobj_t *t2)
|
||||||
// Bomb death
|
// Bomb death
|
||||||
P_KillMobj(t1, t2, t2);
|
P_KillMobj(t1, t2, t2);
|
||||||
// Shootable damage
|
// Shootable damage
|
||||||
P_DamageMobj(t2, t2, t1->target, 1);
|
P_DamageMobj(t2, t1, t1->target, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -337,7 +337,7 @@ boolean K_MineExplosionCollide(mobj_t *t1, mobj_t *t2)
|
||||||
else if (t2->flags & MF_SHOOTABLE)
|
else if (t2->flags & MF_SHOOTABLE)
|
||||||
{
|
{
|
||||||
// Shootable damage
|
// Shootable damage
|
||||||
P_DamageMobj(t2, t2, t1->target, 1);
|
P_DamageMobj(t2, t1, t1->target, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -358,7 +358,7 @@ boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2)
|
||||||
HU_SetCEchoDuration(5);
|
HU_SetCEchoDuration(5);
|
||||||
HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[t2->player-players]));
|
HU_DoCEcho(va("%s\\was hit by a kitchen sink.\\\\\\\\", player_names[t2->player-players]));
|
||||||
I_OutputMsg("%s was hit by a kitchen sink.\n", player_names[t2->player-players]);
|
I_OutputMsg("%s was hit by a kitchen sink.\n", player_names[t2->player-players]);
|
||||||
P_DamageMobj(t2, t1, t1->target, 10000);
|
P_DamageMobj(t2, t1, t1->target, 1, DMG_INSTAKILL);
|
||||||
P_KillMobj(t1, t2, t2);
|
P_KillMobj(t1, t2, t2);
|
||||||
}
|
}
|
||||||
else if (t2->flags & MF_SHOOTABLE)
|
else if (t2->flags & MF_SHOOTABLE)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue