mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- cheats.cpp and ccmds.cpp handled.
# Conflicts: # source/games/duke/src/cheats.cpp
This commit is contained in:
parent
ad84c8149e
commit
669fcc967f
3 changed files with 15 additions and 14 deletions
|
@ -1624,7 +1624,7 @@ void movetransports_r(void)
|
||||||
spawn(act, TRANSPORTERBEAM);
|
spawn(act, TRANSPORTERBEAM);
|
||||||
S_PlayActorSound(TELEPORTER, act);
|
S_PlayActorSound(TELEPORTER, act);
|
||||||
|
|
||||||
for (k = connecthead; k >= 0; k = connectpoint2[k])// connectpoinhittype[i].temp_data[1][k])
|
for (k = connecthead; k >= 0; k = connectpoint2[k])
|
||||||
if (ps[k].cursectnum == Owner->s.sectnum)
|
if (ps[k].cursectnum == Owner->s.sectnum)
|
||||||
{
|
{
|
||||||
ps[k].frag_ps = p;
|
ps[k].frag_ps = p;
|
||||||
|
|
|
@ -46,7 +46,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
|
||||||
unsigned int cstat = 0, picnum = 0;
|
unsigned int cstat = 0, picnum = 0;
|
||||||
unsigned int pal = 0;
|
unsigned int pal = 0;
|
||||||
int ang = 0;
|
int ang = 0;
|
||||||
int set = 0, idx;
|
int set = 0;
|
||||||
|
|
||||||
#if 0 // fixme - route through the network and this limitation becomes irrelevant
|
#if 0 // fixme - route through the network and this limitation becomes irrelevant
|
||||||
if (netgame || numplayers > 1 || !(ps[myconnectindex].gm & MODE_GAME)) {
|
if (netgame || numplayers > 1 || !(ps[myconnectindex].gm & MODE_GAME)) {
|
||||||
|
@ -88,14 +88,15 @@ static int ccmd_spawn(CCmdFuncPtr parm)
|
||||||
return CCMD_SHOWHELP;
|
return CCMD_SHOWHELP;
|
||||||
}
|
}
|
||||||
|
|
||||||
idx = fi.spawn(ps[myconnectindex].i, (short)picnum);
|
auto spawned = spawn(ps[myconnectindex].GetActor(), picnum);
|
||||||
if (set & 1) sprite[idx].pal = (char)pal;
|
if (set & 1) spawned->s.pal = (char)pal;
|
||||||
if (set & 2) sprite[idx].cstat = (short)cstat;
|
if (set & 2) spawned->s.cstat = (short)cstat;
|
||||||
if (set & 4) sprite[idx].ang = ang;
|
if (set & 4) spawned->s.ang = ang;
|
||||||
if (set & 8) {
|
if (set & 8) {
|
||||||
if (setsprite(idx, x, y, z) < 0) {
|
if (setsprite(spawned, x, y, z) < 0)
|
||||||
|
{
|
||||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||||
deletesprite(idx);
|
deletesprite(spawned);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,10 +118,10 @@ static const char *cheatKfc(int player)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
int spr = fi.spawn(ps[player].i, TILE_HEN);
|
auto spr = spawn(ps[player].GetActor(), TILE_HEN);
|
||||||
sprite[spr].pal = 1;
|
spr->s.pal = 1;
|
||||||
sprite[spr].xrepeat = sprite[spr].xrepeat << 2;
|
spr->s.xrepeat = spr->s.xrepeat << 2;
|
||||||
sprite[spr].yrepeat = sprite[spr].yrepeat << 2;
|
spr->s.yrepeat = spr->s.yrepeat << 2;
|
||||||
}
|
}
|
||||||
return quoteMgr.GetQuote(QUOTE_CHEAT_KFC);
|
return quoteMgr.GetQuote(QUOTE_CHEAT_KFC);
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ const char* GameInterface::GenericCheat(int player, int cheat)
|
||||||
ps[player].gotweapon.Zero();
|
ps[player].gotweapon.Zero();
|
||||||
ps[player].curr_weapon = KNEE_WEAPON;
|
ps[player].curr_weapon = KNEE_WEAPON;
|
||||||
ps[player].nocheat = 1;
|
ps[player].nocheat = 1;
|
||||||
sprite[ps[player].i].extra = 1;
|
ps[player].GetActor()->s.extra = 1;
|
||||||
return quoteMgr.GetQuote(QUOTE_YERFUCKED);
|
return quoteMgr.GetQuote(QUOTE_YERFUCKED);
|
||||||
|
|
||||||
case CHT_AARON:
|
case CHT_AARON:
|
||||||
|
@ -486,7 +486,7 @@ static void cmd_Give(int player, uint8_t** stream, bool skip)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIVE_HEALTH:
|
case GIVE_HEALTH:
|
||||||
sprite[ps[player].i].extra = max_player_health << 1;
|
ps[player].GetActor()->s.extra = max_player_health << 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIVE_WEAPONS:
|
case GIVE_WEAPONS:
|
||||||
|
|
Loading…
Reference in a new issue