Added Spectator to Client

main
DodoBirb 4 years ago
parent 3b9c926000
commit b3bd7f170c

@ -453,14 +453,6 @@ switch type_event
global.saxmode = saxmode
global.experimental = experimental
global.freeForAll = freeForAll
if (!lobbyLocked)
{
if global.spectator
{
global.spectator = 0
global.spectatorIndex = -1
}
}
global.lobbyLocked = lobbyLocked
global.samCount = samCount
break

@ -3,7 +3,7 @@ op1.optionid = 0
op1.label = get_text("PauseMenu", "Resume")
op2 = instance_create(x, (y + 16), oPauseOption)
op2.optionid = 1
if (global.saxmode || global.lobbyLocked || global.currentroom == 55 || global.currentroom == 91 || global.currentroom == 128 || global.currentroom == 206 || global.currentroom == 282 || global.currentroom == 281 || global.currentroom == 276 || global.currentroom == 277 || global.currentroom == 205 || global.currentroom == 208 || global.currentroom == 207 || global.currentroom == 387)
if (global.saxmode || global.currentroom == 55 || global.currentroom == 91 || global.currentroom == 128 || global.currentroom == 206 || global.currentroom == 282 || global.currentroom == 281 || global.currentroom == 276 || global.currentroom == 277 || global.currentroom == 205 || global.currentroom == 208 || global.currentroom == 207 || global.currentroom == 387)
op2.enabled = 0
op2.label = get_text("PauseMenu", "Restart")
op3 = instance_create(x, (y + 32), oPauseOption)

@ -27,7 +27,7 @@ if active
}
if (global.curropt == 1)
{
if ((!global.saxmode) && (!global.lobbyLocked) && global.currentroom != 55 && global.currentroom != 91 && global.currentroom != 128 && global.currentroom != 206 && global.currentroom != 282 && global.currentroom != 281 && global.currentroom != 276 && global.currentroom != 277 && global.currentroom != 205 && global.currentroom != 208 && global.currentroom != 207 && global.currentroom != 387)
if ((!global.saxmode) && global.currentroom != 55 && global.currentroom != 91 && global.currentroom != 128 && global.currentroom != 206 && global.currentroom != 282 && global.currentroom != 281 && global.currentroom != 276 && global.currentroom != 277 && global.currentroom != 205 && global.currentroom != 208 && global.currentroom != 207 && global.currentroom != 387)
{
instance_create(50, 92, oOptionsReload)
instance_destroy()

@ -58,6 +58,8 @@ if (global.saxmode && global.sax && global.playerhealth == 1 && (!global.spectat
}
if global.spectator
{
global.sax = 0
global.reform = 0
if global.reform
{
invincible = 1
@ -141,10 +143,10 @@ if global.spectator
{
sprite_index = sMonitoad
image_speed = 0.25
maxSpectatorLeftSpeed = -4
maxSpectatorRightSpeed = 4
maxSpectatorUpSpeed = -4
maxSpectatorDownSpeed = 4
maxSpectatorLeftSpeed = -5
maxSpectatorRightSpeed = 5
maxSpectatorUpSpeed = -5
maxSpectatorDownSpeed = 5
}
if global.sax
{
@ -163,13 +165,13 @@ if global.spectator
}
}
if (kLeft > 0)
xVel -= 0.1
xVel = -5
if (kRight > 0)
xVel += 0.1
xVel = 5
if (kUp > 0)
yVel -= 0.1
yVel = -5
if (kDown > 0)
yVel += 0.1
yVel = 5
if (xVel < maxSpectatorLeftSpeed)
xVel = maxSpectatorLeftSpeed
if (xVel > maxSpectatorRightSpeed)
@ -181,16 +183,16 @@ if global.spectator
if (kLeft == 0 && kRight == 0)
{
if (xVel > 0)
xVel -= 0.1
xVel = 0
if (xVel < 0)
xVel += 0.1
xVel = 0
}
if (kUp == 0 && kDown == 0)
{
if (yVel > 0)
yVel -= 0.1
yVel = 0
if (yVel < 0)
yVel += 0.1
yVel = 0
}
if (!global.enablecontrol)
{
@ -3339,31 +3341,6 @@ if (monster_drain > 0)
else
global.playerhealth -= (global.mod_monstersdrainGS * 4)
}
if global.sax
{
if (global.currentsuit == 0 && oControl.mod_monstersextreme == 0)
global.playerhealth -= (global.mod_monstersdrainPS * 2)
else if (global.currentsuit == 0 && oControl.mod_monstersextreme != 0)
global.playerhealth -= (global.mod_monstersdrainPS * 4)
if (global.currentsuit == 1 && oControl.mod_monstersextreme == 0)
global.playerhealth -= (global.mod_monstersdrainVS * 2)
else if (global.currentsuit == 1 && oControl.mod_monstersextreme != 0)
global.playerhealth -= (global.mod_monstersdrainVS * 4)
if (global.currentsuit == 2 && oControl.mod_monstersextreme == 0)
{
if (global.item[5] == 0)
global.playerhealth -= (global.mod_monstersdrainVS * 2)
else
global.playerhealth -= (global.mod_monstersdrainGS * 2)
}
else if (global.currentsuit == 2 && oControl.mod_monstersextreme != 0)
{
if (global.item[5] == 0)
global.playerhealth -= (global.mod_monstersdrainVS * 4)
else
global.playerhealth -= (global.mod_monstersdrainGS * 4)
}
}
if (global.playerhealth <= 0)
{
with (oControl)
@ -3721,5 +3698,5 @@ if (ballbounce > 0)
statetime += 1
if (state != IDLE && state != SAVING && state != SAVINGFX && state != SAVINGSHIP && state != SAVINGSHIPFX)
global.gametime += 1
if global.freeForAll
if (global.freeForAll && (!global.spectator))
global.sax = global.clientID

Loading…
Cancel
Save