mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
Some cleanup in game.c/actors.c, part 1.
git-svn-id: https://svn.eduke32.com/eduke32@2608 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7c8f2c2887
commit
ab88ea66ef
2 changed files with 115 additions and 146 deletions
|
@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
# define ACTOR_STATIC static
|
# define ACTOR_STATIC static
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KILLIT(KX) { A_DeleteSprite(KX); goto BOLT; }
|
#define KILLIT(KX) do { A_DeleteSprite(KX); goto BOLT; } while (0)
|
||||||
|
|
||||||
extern int32_t g_numEnvSoundsPlaying;
|
extern int32_t g_numEnvSoundsPlaying;
|
||||||
extern int32_t g_noEnemies;
|
extern int32_t g_noEnemies;
|
||||||
|
@ -884,7 +884,7 @@ static inline int32_t ifhitsectors(int32_t sectnum)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IFHITSECT j=ifhitsectors(s->sectnum);if(j >= 0)
|
#define IFHITSECT(Sectnum) if (ifhitsectors(Sectnum) >= 0)
|
||||||
|
|
||||||
int32_t A_IncurDamage(int32_t sn)
|
int32_t A_IncurDamage(int32_t sn)
|
||||||
{
|
{
|
||||||
|
@ -6959,12 +6959,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
j = nextspritestat[j];
|
j = nextspritestat[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
KILLIT(i);
|
KILLIT(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //Not hit yet
|
else //Not hit yet
|
||||||
{
|
{
|
||||||
IFHITSECT
|
IFHITSECT(s->sectnum)
|
||||||
{
|
{
|
||||||
P_DoQuote(QUOTE_UNLOCKED,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_UNLOCKED,g_player[myconnectindex].ps);
|
||||||
|
|
||||||
|
@ -6977,13 +6978,10 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
case 0:
|
case 0:
|
||||||
if (sprite[l].hitag == sh)
|
if (sprite[l].hitag == sh)
|
||||||
{
|
{
|
||||||
|
int32_t ow = sprite[l].owner;
|
||||||
q = sprite[l].sectnum;
|
q = sprite[l].sectnum;
|
||||||
sector[q].floorshade =
|
sector[q].floorshade = sector[q].ceilingshade = sprite[ow].shade;
|
||||||
sector[q].ceilingshade =
|
sector[q].floorpal = sector[q].ceilingpal = sprite[ow].pal;
|
||||||
sprite[sprite[l].owner].shade;
|
|
||||||
sector[q].floorpal =
|
|
||||||
sector[q].ceilingpal =
|
|
||||||
sprite[sprite[l].owner].pal;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -8002,14 +8000,13 @@ void G_MoveWorld(void)
|
||||||
G_MoveStandables(); //ST 6
|
G_MoveStandables(); //ST 6
|
||||||
|
|
||||||
{
|
{
|
||||||
int32_t i, p, j, k = MAXSTATUS-1, pl;
|
int32_t p, j, k = MAXSTATUS-1, pl;
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
int32_t numsavedfires = 0;
|
int32_t numsavedfires = 0;
|
||||||
int32_t ii;
|
|
||||||
#endif
|
#endif
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
i = headspritestat[k];
|
int32_t i = headspritestat[k];
|
||||||
|
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
|
@ -8028,6 +8025,7 @@ void G_MoveWorld(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int32_t ii;
|
||||||
|
|
||||||
if (actor[i].lightptr != NULL && actor[i].lightcount)
|
if (actor[i].lightptr != NULL && actor[i].lightcount)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2965,6 +2965,8 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
// JBF 20040124: display level stats in screen corner
|
// JBF 20040124: display level stats in screen corner
|
||||||
if ((ud.overhead_on != 2 && ud.levelstats) && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
if ((ud.overhead_on != 2 && ud.levelstats) && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||||
{
|
{
|
||||||
|
const DukePlayer_t *myps = g_player[myconnectindex].ps;
|
||||||
|
|
||||||
if (ud.screen_size == 4)
|
if (ud.screen_size == 4)
|
||||||
{
|
{
|
||||||
i = scale(ud.althud?tilesizy[BIGALPHANUM]+10:tilesizy[INVENTORYBOX]+2,ud.statusbarscale,100);
|
i = scale(ud.althud?tilesizy[BIGALPHANUM]+10:tilesizy[INVENTORYBOX]+2,ud.statusbarscale,100);
|
||||||
|
@ -2982,33 +2984,37 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
}
|
}
|
||||||
j = scale(2,ud.config.ScreenWidth,320);
|
j = scale(2,ud.config.ScreenWidth,320);
|
||||||
|
|
||||||
|
|
||||||
Bsprintf(tempbuf,"T:^15%d:%02d.%02d",
|
Bsprintf(tempbuf,"T:^15%d:%02d.%02d",
|
||||||
(g_player[myconnectindex].ps->player_par/(REALGAMETICSPERSEC*60)),
|
(myps->player_par/(REALGAMETICSPERSEC*60)),
|
||||||
(g_player[myconnectindex].ps->player_par/REALGAMETICSPERSEC)%60,
|
(myps->player_par/REALGAMETICSPERSEC)%60,
|
||||||
((g_player[myconnectindex].ps->player_par%REALGAMETICSPERSEC)*33)/10
|
((myps->player_par%REALGAMETICSPERSEC)*33)/10
|
||||||
);
|
);
|
||||||
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(21),tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(21),
|
||||||
|
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
||||||
|
|
||||||
if (ud.player_skill > 3 || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_PLAYERSFRIENDLY)))
|
if (ud.player_skill > 3 || ((g_netServer || ud.multimode > 1) && !GTFLAGS(GAMETYPE_PLAYERSFRIENDLY)))
|
||||||
Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY))?
|
Bsprintf(tempbuf,"K:^15%d",(ud.multimode>1 &&!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY))?
|
||||||
g_player[myconnectindex].ps->frag-g_player[myconnectindex].ps->fraggedself:g_player[myconnectindex].ps->actors_killed);
|
myps->frag-myps->fraggedself:myps->actors_killed);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_player[myconnectindex].ps->actors_killed >= g_player[myconnectindex].ps->max_actors_killed)
|
if (myps->actors_killed >= myps->max_actors_killed)
|
||||||
Bsprintf(tempbuf,"K:%d/%d",g_player[myconnectindex].ps->actors_killed,
|
Bsprintf(tempbuf,"K:%d/%d",myps->actors_killed,
|
||||||
g_player[myconnectindex].ps->max_actors_killed>g_player[myconnectindex].ps->actors_killed?
|
myps->max_actors_killed>myps->actors_killed?
|
||||||
g_player[myconnectindex].ps->max_actors_killed:g_player[myconnectindex].ps->actors_killed);
|
myps->max_actors_killed:myps->actors_killed);
|
||||||
else
|
else
|
||||||
Bsprintf(tempbuf,"K:^15%d/%d",g_player[myconnectindex].ps->actors_killed,
|
Bsprintf(tempbuf,"K:^15%d/%d",myps->actors_killed,
|
||||||
g_player[myconnectindex].ps->max_actors_killed>g_player[myconnectindex].ps->actors_killed?
|
myps->max_actors_killed>myps->actors_killed?
|
||||||
g_player[myconnectindex].ps->max_actors_killed:g_player[myconnectindex].ps->actors_killed);
|
myps->max_actors_killed:myps->actors_killed);
|
||||||
}
|
}
|
||||||
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(14),tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(14),
|
||||||
|
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->secret_rooms == g_player[myconnectindex].ps->max_secret_rooms)
|
if (myps->secret_rooms == myps->max_secret_rooms)
|
||||||
Bsprintf(tempbuf,"S:%d/%d", g_player[myconnectindex].ps->secret_rooms,g_player[myconnectindex].ps->max_secret_rooms);
|
Bsprintf(tempbuf,"S:%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
||||||
else Bsprintf(tempbuf,"S:^15%d/%d", g_player[myconnectindex].ps->secret_rooms,g_player[myconnectindex].ps->max_secret_rooms);
|
else Bsprintf(tempbuf,"S:^15%d/%d", myps->secret_rooms, myps->max_secret_rooms);
|
||||||
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(7),tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
G_PrintGameText(13,STARTALPHANUM, j,scale(200-i,ud.config.ScreenHeight,200)-textsc(7),
|
||||||
|
tempbuf,0,10,26,0, 0, xdim-1, ydim-1, 65536);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex)
|
if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex)
|
||||||
|
@ -3633,7 +3639,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||||
if (p->over_shoulder_on)
|
if (p->over_shoulder_on)
|
||||||
{
|
{
|
||||||
ud.camera.z -= 3072;
|
ud.camera.z -= 3072;
|
||||||
G_DoThirdPerson(p,(vec3_t *)&ud,&ud.camerasect,ud.cameraang,ud.camerahoriz);
|
G_DoThirdPerson(p,(vec3_t *)&ud.camera,&ud.camerasect,ud.cameraang,ud.camerahoriz);
|
||||||
}
|
}
|
||||||
|
|
||||||
cz = actor[p->i].ceilingz;
|
cz = actor[p->i].ceilingz;
|
||||||
|
@ -6971,12 +6977,18 @@ static void G_CheatGetInv(void)
|
||||||
doinvcheat(GET_FIRSTAID, g_player[myconnectindex].ps->max_player_health, EVENT_CHEATGETFIRSTAID);
|
doinvcheat(GET_FIRSTAID, g_player[myconnectindex].ps->max_player_health, EVENT_CHEATGETFIRSTAID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void end_cheat(void)
|
||||||
|
{
|
||||||
|
g_player[myconnectindex].ps->cheat_phase = 0;
|
||||||
|
KB_FlushKeyBoardQueue();
|
||||||
|
}
|
||||||
|
|
||||||
static int8_t cheatbuf[MAXCHEATLEN], cheatbuflen;
|
static int8_t cheatbuf[MAXCHEATLEN], cheatbuflen;
|
||||||
|
|
||||||
GAME_STATIC void G_DoCheats(void)
|
GAME_STATIC void G_DoCheats(void)
|
||||||
{
|
{
|
||||||
int32_t ch, i, j, k=0, weapon;
|
int32_t ch, i, j, k=0, weapon;
|
||||||
static int32_t z=0;
|
static int32_t vol1inited=0;
|
||||||
char consolecheat = 0; // JBF 20030914
|
char consolecheat = 0; // JBF 20030914
|
||||||
|
|
||||||
if (osdcmd_cheatsinfo_stat.cheatnum != -1)
|
if (osdcmd_cheatsinfo_stat.cheatnum != -1)
|
||||||
|
@ -6990,11 +7002,11 @@ GAME_STATIC void G_DoCheats(void)
|
||||||
if (g_player[myconnectindex].ps->gm & (MODE_TYPE|MODE_MENU))
|
if (g_player[myconnectindex].ps->gm & (MODE_TYPE|MODE_MENU))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (VOLUMEONE && !z)
|
if (VOLUMEONE && !vol1inited)
|
||||||
{
|
{
|
||||||
Bstrcpy(CheatStrings[2],"scotty##");
|
Bstrcpy(CheatStrings[2],"scotty##");
|
||||||
Bstrcpy(CheatStrings[6],"<RESERVED>");
|
Bstrcpy(CheatStrings[6],"<RESERVED>");
|
||||||
z=1;
|
vol1inited = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (consolecheat && numplayers < 2 && ud.recstat == 0)
|
if (consolecheat && numplayers < 2 && ud.recstat == 0)
|
||||||
|
@ -7055,49 +7067,43 @@ FOUNDCHEAT:
|
||||||
g_player[myconnectindex].ps->gotweapon |= (1<<weapon);
|
g_player[myconnectindex].ps->gotweapon |= (1<<weapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
P_DoQuote(QUOTE_CHEAT_ALL_WEAPONS, g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_ALL_WEAPONS, g_player[myconnectindex].ps);
|
||||||
|
|
||||||
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_INVENTORY:
|
case CHEAT_INVENTORY:
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
G_CheatGetInv();
|
G_CheatGetInv();
|
||||||
P_DoQuote(QUOTE_CHEAT_ALL_INV, g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_ALL_INV, g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_KEYS:
|
case CHEAT_KEYS:
|
||||||
g_player[myconnectindex].ps->got_access = 7;
|
g_player[myconnectindex].ps->got_access = 7;
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
P_DoQuote(QUOTE_CHEAT_ALL_KEYS, g_player[myconnectindex].ps);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_DEBUG:
|
case CHEAT_DEBUG:
|
||||||
g_Debug = 1-g_Debug;
|
g_Debug = 1-g_Debug;
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
|
|
||||||
G_DumpDebugInfo();
|
G_DumpDebugInfo();
|
||||||
Bsprintf(tempbuf,"Gamevars dumped to log");
|
Bsprintf(tempbuf,"Gamevars dumped to log");
|
||||||
G_AddUserQuote(tempbuf);
|
G_AddUserQuote(tempbuf);
|
||||||
Bsprintf(tempbuf,"Map dumped to debug.map");
|
Bsprintf(tempbuf,"Map dumped to debug.map");
|
||||||
G_AddUserQuote(tempbuf);
|
G_AddUserQuote(tempbuf);
|
||||||
|
end_cheat();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHEAT_CLIP:
|
case CHEAT_CLIP:
|
||||||
ud.noclip = 1-ud.noclip;
|
ud.noclip = 1-ud.noclip;
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
P_DoQuote(QUOTE_CHEAT_NOCLIP-!ud.noclip, g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_NOCLIP-!ud.noclip, g_player[myconnectindex].ps);
|
||||||
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_RESERVED2:
|
case CHEAT_RESERVED2:
|
||||||
g_player[myconnectindex].ps->gm = MODE_EOL;
|
g_player[myconnectindex].ps->gm = MODE_EOL;
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_ALLEN:
|
case CHEAT_ALLEN:
|
||||||
|
@ -7109,24 +7115,27 @@ FOUNDCHEAT:
|
||||||
case CHEAT_CORNHOLIO:
|
case CHEAT_CORNHOLIO:
|
||||||
case CHEAT_KROZ:
|
case CHEAT_KROZ:
|
||||||
case CHEAT_COMEGETSOME:
|
case CHEAT_COMEGETSOME:
|
||||||
|
{
|
||||||
|
const int32_t pi = g_player[myconnectindex].ps->i;
|
||||||
|
|
||||||
ud.god = 1-ud.god;
|
ud.god = 1-ud.god;
|
||||||
|
|
||||||
if (ud.god)
|
if (ud.god)
|
||||||
{
|
{
|
||||||
pus = 1;
|
pus = 1;
|
||||||
pub = 1;
|
pub = 1;
|
||||||
sprite[g_player[myconnectindex].ps->i].cstat = 257;
|
sprite[pi].cstat = 257;
|
||||||
|
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[0] = 0;
|
actor[pi].t_data[0] = 0;
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[1] = 0;
|
actor[pi].t_data[1] = 0;
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[2] = 0;
|
actor[pi].t_data[2] = 0;
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[3] = 0;
|
actor[pi].t_data[3] = 0;
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[4] = 0;
|
actor[pi].t_data[4] = 0;
|
||||||
actor[g_player[myconnectindex].ps->i].t_data[5] = 0;
|
actor[pi].t_data[5] = 0;
|
||||||
|
|
||||||
sprite[g_player[myconnectindex].ps->i].hitag = 0;
|
sprite[pi].hitag = 0;
|
||||||
sprite[g_player[myconnectindex].ps->i].lotag = 0;
|
sprite[pi].lotag = 0;
|
||||||
sprite[g_player[myconnectindex].ps->i].pal = g_player[myconnectindex].ps->palookup;
|
sprite[pi].pal = g_player[myconnectindex].ps->palookup;
|
||||||
|
|
||||||
if (k != CHEAT_COMEGETSOME)
|
if (k != CHEAT_COMEGETSOME)
|
||||||
{
|
{
|
||||||
|
@ -7150,22 +7159,23 @@ FOUNDCHEAT:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprite[g_player[myconnectindex].ps->i].extra = g_player[myconnectindex].ps->max_player_health;
|
sprite[pi].extra = g_player[myconnectindex].ps->max_player_health;
|
||||||
actor[g_player[myconnectindex].ps->i].extra = -1;
|
actor[pi].extra = -1;
|
||||||
g_player[myconnectindex].ps->last_extra = g_player[myconnectindex].ps->max_player_health;
|
g_player[myconnectindex].ps->last_extra = g_player[myconnectindex].ps->max_player_health;
|
||||||
P_DoQuote(QUOTE_CHEAT_GODMODE_OFF,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_GODMODE_OFF,g_player[myconnectindex].ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprite[g_player[myconnectindex].ps->i].extra = g_player[myconnectindex].ps->max_player_health;
|
sprite[pi].extra = g_player[myconnectindex].ps->max_player_health;
|
||||||
actor[g_player[myconnectindex].ps->i].extra = 0;
|
actor[pi].extra = 0;
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
if (k != CHEAT_COMEGETSOME)
|
if (k != CHEAT_COMEGETSOME)
|
||||||
g_player[myconnectindex].ps->dead_flag = 0;
|
g_player[myconnectindex].ps->dead_flag = 0;
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
case CHEAT_STUFF:
|
case CHEAT_STUFF:
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
if (VOLUMEONE)
|
if (VOLUMEONE)
|
||||||
|
@ -7174,19 +7184,17 @@ FOUNDCHEAT:
|
||||||
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS-j; weapon++)
|
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS-j; weapon++)
|
||||||
g_player[myconnectindex].ps->gotweapon |= (1<<weapon);
|
g_player[myconnectindex].ps->gotweapon |= (1<<weapon);
|
||||||
|
|
||||||
for (weapon = PISTOL_WEAPON;
|
for (weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS-j; weapon++)
|
||||||
weapon < (MAX_WEAPONS-j);
|
|
||||||
weapon++)
|
|
||||||
P_AddAmmo(weapon, g_player[myconnectindex].ps, g_player[myconnectindex].ps->max_ammo_amount[weapon]);
|
P_AddAmmo(weapon, g_player[myconnectindex].ps, g_player[myconnectindex].ps->max_ammo_amount[weapon]);
|
||||||
G_CheatGetInv();
|
|
||||||
g_player[myconnectindex].ps->got_access = 7;
|
|
||||||
P_DoQuote(QUOTE_CHEAT_EVERYTHING, g_player[myconnectindex].ps);
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
|
|
||||||
// P_DoQuote(QUOTE_21,g_player[myconnectindex].ps);
|
G_CheatGetInv();
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
g_player[myconnectindex].ps->got_access = 7;
|
||||||
KB_FlushKeyBoardQueue();
|
P_DoQuote(QUOTE_CHEAT_EVERYTHING, g_player[myconnectindex].ps);
|
||||||
|
|
||||||
|
// P_DoQuote(QUOTE_21,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->inven_icon = 1;
|
g_player[myconnectindex].ps->inven_icon = 1;
|
||||||
|
|
||||||
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_SCOTTY:
|
case CHEAT_SCOTTY:
|
||||||
|
@ -7215,8 +7223,7 @@ FOUNDCHEAT:
|
||||||
if ((VOLUMEONE && volnume > 0) || volnume > g_numVolumes-1 ||
|
if ((VOLUMEONE && volnume > 0) || volnume > g_numVolumes-1 ||
|
||||||
levnume >= MAXLEVELS || MapInfo[volnume *MAXLEVELS+levnume].filename == NULL)
|
levnume >= MAXLEVELS || MapInfo[volnume *MAXLEVELS+levnume].filename == NULL)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7239,14 +7246,12 @@ FOUNDCHEAT:
|
||||||
Net_NewGame(ud.m_volume_number,ud.m_level_number);
|
Net_NewGame(ud.m_volume_number,ud.m_level_number);
|
||||||
else g_player[myconnectindex].ps->gm |= MODE_RESTART;
|
else g_player[myconnectindex].ps->gm |= MODE_RESTART;
|
||||||
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_COORDS:
|
case CHEAT_COORDS:
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
ud.coords = 1-ud.coords;
|
ud.coords = 1-ud.coords;
|
||||||
KB_FlushKeyBoardQueue();
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_VIEW:
|
case CHEAT_VIEW:
|
||||||
|
@ -7259,15 +7264,12 @@ FOUNDCHEAT:
|
||||||
g_cameraClock = totalclock;
|
g_cameraClock = totalclock;
|
||||||
}
|
}
|
||||||
// P_DoQuote(QUOTE_CHEATS_DISABLED,g_player[myconnectindex].ps);
|
// P_DoQuote(QUOTE_CHEATS_DISABLED,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_TIME:
|
case CHEAT_TIME:
|
||||||
|
|
||||||
// P_DoQuote(QUOTE_21,g_player[myconnectindex].ps);
|
// P_DoQuote(QUOTE_21,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_UNLOCK:
|
case CHEAT_UNLOCK:
|
||||||
|
@ -7287,8 +7289,7 @@ FOUNDCHEAT:
|
||||||
G_OperateForceFields(g_player[myconnectindex].ps->i,-1);
|
G_OperateForceFields(g_player[myconnectindex].ps->i,-1);
|
||||||
|
|
||||||
P_DoQuote(QUOTE_CHEAT_UNLOCK,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_UNLOCK,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_CASHMAN:
|
case CHEAT_CASHMAN:
|
||||||
|
@ -7299,59 +7300,46 @@ FOUNDCHEAT:
|
||||||
|
|
||||||
case CHEAT_ITEMS:
|
case CHEAT_ITEMS:
|
||||||
G_CheatGetInv();
|
G_CheatGetInv();
|
||||||
g_player[myconnectindex].ps->got_access = 7;
|
g_player[myconnectindex].ps->got_access = 7;
|
||||||
P_DoQuote(QUOTE_CHEAT_EVERYTHING,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_EVERYTHING,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
||||||
ud.showallmap = 1-ud.showallmap;
|
ud.showallmap = !ud.showallmap;
|
||||||
if (ud.showallmap)
|
|
||||||
{
|
for (i=0; i<(MAXSECTORS>>3); i++)
|
||||||
for (i=0; i<(MAXSECTORS>>3); i++)
|
show2dsector[i] = ud.showallmap*255;
|
||||||
show2dsector[i] = 255;
|
for (i=0; i<(MAXWALLS>>3); i++)
|
||||||
for (i=0; i<(MAXWALLS>>3); i++)
|
show2dwall[i] = ud.showallmap*255;
|
||||||
show2dwall[i] = 255;
|
|
||||||
P_DoQuote(QUOTE_SHOW_MAP_ON, g_player[myconnectindex].ps);
|
P_DoQuote(ud.showallmap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_ON,
|
||||||
}
|
g_player[myconnectindex].ps);
|
||||||
else
|
|
||||||
{
|
end_cheat();
|
||||||
for (i=0; i<(MAXSECTORS>>3); i++)
|
|
||||||
show2dsector[i] = 0;
|
|
||||||
for (i=0; i<(MAXWALLS>>3); i++)
|
|
||||||
show2dwall[i] = 0;
|
|
||||||
P_DoQuote(QUOTE_SHOW_MAP_OFF, g_player[myconnectindex].ps);
|
|
||||||
}
|
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_TODD:
|
case CHEAT_TODD:
|
||||||
P_DoQuote(QUOTE_CHEAT_TODD,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_TODD,g_player[myconnectindex].ps);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_RATE:
|
case CHEAT_RATE:
|
||||||
ud.tickrate = !ud.tickrate;
|
ud.tickrate = !ud.tickrate;
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_BETA:
|
case CHEAT_BETA:
|
||||||
P_DoQuote(QUOTE_CHEAT_BETA,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_BETA,g_player[myconnectindex].ps);
|
||||||
KB_ClearKeyDown(sc_H);
|
KB_ClearKeyDown(sc_H);
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
end_cheat();
|
||||||
KB_FlushKeyBoardQueue();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_HYPER:
|
case CHEAT_HYPER:
|
||||||
g_player[myconnectindex].ps->inv_amount[GET_STEROIDS] = 399;
|
g_player[myconnectindex].ps->inv_amount[GET_STEROIDS] = 399;
|
||||||
g_player[myconnectindex].ps->inv_amount[GET_HEATS] = 1200;
|
g_player[myconnectindex].ps->inv_amount[GET_HEATS] = 1200;
|
||||||
g_player[myconnectindex].ps->cheat_phase = 0;
|
|
||||||
P_DoQuote(QUOTE_CHEAT_STEROIDS,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_CHEAT_STEROIDS,g_player[myconnectindex].ps);
|
||||||
KB_FlushKeyBoardQueue();
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_MONSTERS:
|
case CHEAT_MONSTERS:
|
||||||
|
@ -7361,14 +7349,13 @@ FOUNDCHEAT:
|
||||||
if (++g_noEnemies == 3)
|
if (++g_noEnemies == 3)
|
||||||
g_noEnemies = 0;
|
g_noEnemies = 0;
|
||||||
|
|
||||||
g_player[screenpeek].ps->cheat_phase = 0;
|
|
||||||
|
|
||||||
Bsprintf(ScriptQuotes[QUOTE_RESERVED4], "Monsters: %s", s[g_noEnemies & 1]);
|
Bsprintf(ScriptQuotes[QUOTE_RESERVED4], "Monsters: %s", s[g_noEnemies & 1]);
|
||||||
P_DoQuote(QUOTE_RESERVED4,g_player[myconnectindex].ps);
|
P_DoQuote(QUOTE_RESERVED4,g_player[myconnectindex].ps);
|
||||||
|
|
||||||
KB_FlushKeyBoardQueue();
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case CHEAT_RESERVED:
|
case CHEAT_RESERVED:
|
||||||
case CHEAT_RESERVED3:
|
case CHEAT_RESERVED3:
|
||||||
ud.eog = 1;
|
ud.eog = 1;
|
||||||
|
@ -10897,37 +10884,21 @@ int32_t G_DoMoveThings(void)
|
||||||
|
|
||||||
static void G_DoOrderScreen(void)
|
static void G_DoOrderScreen(void)
|
||||||
{
|
{
|
||||||
|
int32_t i;
|
||||||
|
|
||||||
setview(0,0,xdim-1,ydim-1);
|
setview(0,0,xdim-1,ydim-1);
|
||||||
|
|
||||||
fadepal(0,0,0, 0,63,7);
|
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
|
||||||
KB_FlushKeyboardQueue();
|
|
||||||
rotatesprite_fs(0,0,65536L,0,ORDERING,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
|
||||||
fadepal(0,0,0, 63,0,-7);
|
|
||||||
while (!KB_KeyWaiting())
|
|
||||||
G_HandleAsync();
|
|
||||||
|
|
||||||
fadepal(0,0,0, 0,63,7);
|
for (i=0; i<4; i++)
|
||||||
KB_FlushKeyboardQueue();
|
{
|
||||||
rotatesprite_fs(0,0,65536L,0,ORDERING+1,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
fadepal(0,0,0, 0,63,7);
|
||||||
fadepal(0,0,0, 63,0,-7);
|
KB_FlushKeyboardQueue();
|
||||||
while (!KB_KeyWaiting())
|
rotatesprite_fs(0,0,65536L,0,ORDERING+i,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
||||||
G_HandleAsync();
|
fadepal(0,0,0, 63,0,-7);
|
||||||
|
while (!KB_KeyWaiting())
|
||||||
fadepal(0,0,0, 0,63,7);
|
G_HandleAsync();
|
||||||
KB_FlushKeyboardQueue();
|
}
|
||||||
rotatesprite_fs(0,0,65536L,0,ORDERING+2,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
|
||||||
fadepal(0,0,0, 63,0,-7);
|
|
||||||
while (!KB_KeyWaiting())
|
|
||||||
G_HandleAsync();
|
|
||||||
|
|
||||||
fadepal(0,0,0, 0,63,7);
|
|
||||||
KB_FlushKeyboardQueue();
|
|
||||||
rotatesprite_fs(0,0,65536L,0,ORDERING+3,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
|
||||||
fadepal(0,0,0, 63,0,-7);
|
|
||||||
while (!KB_KeyWaiting())
|
|
||||||
G_HandleAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue