Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Items.bb
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ Function UpdateItems()
deletedItem = False
Next

If ClosestItem <> Null Then
If ClosestItem <> Null And KillTimer >= 0 Then
;DrawHandIcon = True

If MouseHit1 Then PickItem(ClosestItem)
Expand Down
5 changes: 4 additions & 1 deletion Main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ Global SCP1025state#[6]
Global HeartBeatRate#, HeartBeatTimer#, HeartBeatVolume#

Global WearingGasMask%, WearingHazmat%, WearingVest%, Wearing714%, WearingNightVision%
Global RemoveHazmatTimer#, Remove714Timer#
Global NVTimer#

Global SuperMan%, SuperManTimer#
Expand Down Expand Up @@ -4709,7 +4710,7 @@ Function DrawGUI()
EndIf
EndIf

If ClosestItem <> Null Then
If ClosestItem <> Null And KillTimer >= 0 Then
yawvalue# = -DeltaYaw(Camera, ClosestItem\collider)
If yawvalue > 90 And yawvalue <= 180 Then yawvalue = 90
If yawvalue > 180 And yawvalue < 270 Then yawvalue = 270
Expand Down Expand Up @@ -8776,6 +8777,8 @@ Function NullGame(playbuttonsfx%=True)
CameraFogFar = StoredCameraFogFar
WearingNightVision = 0
EndIf
RemoveHazmatTimer = 0.0
Remove714Timer = 0.0
I_427\Using = 0
I_427\Timer = 0.0

Expand Down
62 changes: 36 additions & 26 deletions NPCs.bb
Original file line number Diff line number Diff line change
Expand Up @@ -1741,37 +1741,46 @@ Function UpdateNPCs()
RotateEntity n\Collider,0,CurveAngle(EntityYaw(n\obj),EntityYaw(n\Collider),10.0),0

If dist < 0.5 Then
If WearingHazmat>0 Then
BlurTimer = BlurTimer+FPSfactor*2.5
If BlurTimer>250 And BlurTimer-FPSfactor*2.5 <= 250 And n\PrevState<>3 Then
If n\SoundChn2 <> 0 Then StopChannel(n\SoundChn2)
If WearingHazmat > 0 Then
RemoveHazmatTimer = RemoveHazmatTimer + FPSfactor*1.5

If RemoveHazmatTimer > 100 And RemoveHazmatTimer - FPSfactor*1.5 <= 100 And (Not ChannelPlaying(n\SoundChn2)) Then
n\SoundChn2 = PlaySound_Strict(LoadTempSound("SFX\SCP\049\TakeOffHazmat.ogg"))
n\PrevState=3
ElseIf BlurTimer => 500
For i = 0 To MaxItemAmount-1
If Inventory(i)<>Null Then
If Instr(Inventory(i)\itemtemplate\tempname,"hazmatsuit") And WearingHazmat<3 Then
If Inventory(i)\state2 < 3 Then
Inventory(i)\state2 = Inventory(i)\state2 + 1
BlurTimer = 260.0
CameraShake = 2.0
Else
RemoveItem(Inventory(i))
WearingHazmat = False
EndIf
Exit
ElseIf RemoveHazmatTimer > 500 Then
For i = 0 To 3
If RemoveHazmatTimer > 500 + i*240 And RemoveHazmatTimer - FPSfactor*1.5 <= 500 + i*240 Then
CameraShake = 2.0
If i = 3 Then
For i = 0 To MaxItemAmount - 1
If Inventory(i) <> Null Then
If Instr(Inventory(i)\itemtemplate\tempname, "hazmatsuit") Then
WearingHazmat = False : DropItem(Inventory(i))
Msg = "The hazmat suit was forcibly removed." : MsgTimer = 70*5
Exit
EndIf
EndIf
Next
EndIf
EndIf
Next
EndIf
ElseIf Wearing714 Then
BlurTimer = BlurTimer+FPSfactor*2.5
If BlurTimer>250 And BlurTimer-FPSfactor*2.5 <= 250 And n\PrevState<>3 Then
If n\SoundChn2 <> 0 Then StopChannel(n\SoundChn2)
BlurTimer = BlurTimer + FPSfactor*2.5

Remove714Timer = Remove714Timer + FPSfactor*1.5

If Remove714Timer > 100 And Remove714Timer - FPSfactor*1.5 <= 100 And (Not ChannelPlaying(n\SoundChn2)) Then
n\SoundChn2 = PlaySound_Strict(LoadTempSound("SFX\SCP\049\714Equipped.ogg"))
n\PrevState=3
ElseIf BlurTimer => 500
Wearing714=False
ElseIf Remove714Timer > 500 Then
For i = 0 To MaxItemAmount - 1
If Inventory(i) <> Null Then
If Inventory(i)\itemtemplate\tempname = "scp714" Then
Wearing714 = False : DropItem(Inventory(i))
Msg = "The ring was forcibly removed." : MsgTimer = 70*5
Exit
EndIf
EndIf
Next
EndIf
Else
CurrCameraZoom = 20.0
Expand All @@ -1795,11 +1804,12 @@ Function UpdateNPCs()
EndIf
EndIf
Else
RemoveHazmatTimer = Max(RemoveHazmatTimer - FPSfactor, 0.0)
Remove714Timer = Max(Remove714Timer - FPSfactor, 0.0)

n\CurrSpeed = CurveValue(n\Speed, n\CurrSpeed, 20.0)
MoveEntity n\Collider, 0, 0, n\CurrSpeed * FPSfactor

If n\PrevState = 3 Then n\PrevState = 2

If dist < 3.0 Then
AnimateNPC(n, Max(Min(AnimTime(n\obj),428.0),387), 463.0, n\CurrSpeed*38)
Else
Expand Down
3 changes: 3 additions & 0 deletions Save.bb
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,9 @@ Function LoadGameQuick(file$)
LightFlash = 0
BlurTimer = 0

RemoveHazmatTimer = 0.0
Remove714Timer = 0.0

KillTimer = 0
FallTimer = 0
MenuOpen = False
Expand Down