Skip to content

Commit

Permalink
Merge pull request Regalis11#87 from ENDSHN/dev
Browse files Browse the repository at this point in the history
More SCP:CB fixes (details in every commit)
  • Loading branch information
Regalis11 authored Jun 6, 2017
2 parents 48cae53 + 31c149c commit eba25b0
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 92 deletions.
2 changes: 2 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Removed unused animation from SCP-966's model.
- Optimized SCP-966's animation key frames.
- Tweaked SCP-914 key card refinery system again.
- Added Third Subvision Studio startup screen.

Bug fixes:
- Fixed a crash that occured while quick-loading a save file.
Expand All @@ -32,6 +33,7 @@ Bug fixes:
- Fixed the item dropspeed increasing each time an item has been picked up.
- Another attempt of fixing room overlapping issues.
- Fixed Ulgrin's path during the breach event.
- Fixed the levers in the electrical center: Now they can't be flipped into the control panel anymore.

----------------------------------------------------------------------------------

Expand Down
3 changes: 3 additions & 0 deletions Credits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@

Irontaco
Various ideas for different game mechanics.

Meow :3
Third Subvision Studio startup screen.

/v/ and everyone in the SCP-CB forum
Ideas & support.
Expand Down
Binary file added GFX/menu/startup_TSS.avi
Binary file not shown.
Binary file added GFX/menu/startup_TSS.ogg
Binary file not shown.
File renamed without changes.
File renamed without changes.
65 changes: 44 additions & 21 deletions Main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2842,20 +2842,6 @@ Repeat

If FPSfactor > 0 And PlayerRoom\RoomTemplate\Name <> "dimension1499" Then UpdateSecurityCams()

If KeyHit(KEY_INV) And VomitTimer >= 0
If (Not UnableToMove) And (Not IsZombie)
If InvOpen Then
ResumeSounds()
MouseXSpeed() : MouseYSpeed() : MouseZSpeed() : mouse_x_speed_1#=0.0 : mouse_y_speed_1#=0.0
Else
PauseSounds()
EndIf
InvOpen = Not InvOpen
If OtherOpen<>Null Then OtherOpen=Null
SelectedItem = Null
EndIf
EndIf

If PlayerRoom\RoomTemplate\Name <> "pocketdimension" And PlayerRoom\RoomTemplate\Name <> "gatea" And PlayerRoom\RoomTemplate\Name <> "exit1" And (Not MenuOpen) And (Not ConsoleOpen) And (Not InvOpen) Then

If Rand(1500) = 1 Then
Expand Down Expand Up @@ -2969,7 +2955,9 @@ Repeat

If InfiniteStamina% Then Stamina = Min(100, Stamina + (100.0-Stamina)*0.01*FPSfactor)

If FPSfactor>0
If FPSfactor=0
UpdateWorld(0)
Else
UpdateWorld()
ManipulateNPCBones()
EndIf
Expand Down Expand Up @@ -3100,6 +3088,20 @@ Repeat

;[End block]

If KeyHit(KEY_INV) And VomitTimer >= 0
If (Not UnableToMove) And (Not IsZombie)
If InvOpen Then
ResumeSounds()
MouseXSpeed() : MouseYSpeed() : MouseZSpeed() : mouse_x_speed_1#=0.0 : mouse_y_speed_1#=0.0
Else
PauseSounds()
EndIf
InvOpen = Not InvOpen
If OtherOpen<>Null Then OtherOpen=Null
SelectedItem = Null
EndIf
EndIf

If KeyHit(KEY_SAVE) Then
If SelectedDifficulty\saveType = SAVEANYWHERE Then
RN$ = PlayerRoom\RoomTemplate\Name$
Expand Down Expand Up @@ -11273,12 +11275,6 @@ Function PlayStartupVideos()
TranslateEntity Cam, 1.0 / 2048 ,-1.0 / 2048 ,-1.0
EntityParent Quad, Cam, 1

Local moviefile$ = "GFX\menu\startup"
BlitzMovie_Open(moviefile$+".avi") ;Get movie size
Local moview = BlitzMovie_GetWidth()
Local movieh = BlitzMovie_GetHeight()
BlitzMovie_Close()

Local ScaledGraphicHeight%
Local Ratio# = Float(RealGraphicWidth)/Float(RealGraphicHeight)
If Ratio>1.76 And Ratio<1.78
Expand All @@ -11289,11 +11285,37 @@ Function PlayStartupVideos()
DebugLog "Scaled: "+ScaledGraphicHeight
EndIf

Local moviefile$ = "GFX\menu\startup_Undertow"
BlitzMovie_Open(moviefile$+".avi") ;Get movie size
Local moview = BlitzMovie_GetWidth()
Local movieh = BlitzMovie_GetHeight()
BlitzMovie_Close()
Local image = CreateImage(moview, movieh)
Local SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
SplashScreenVideo = BlitzMovie_Play()
Local SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
Repeat
Cls
ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
Flip
Until (GetKey() Or (Not IsStreamPlaying_Strict(SplashScreenAudio)))
StopStream_Strict(SplashScreenAudio)
BlitzMovie_Stop()
BlitzMovie_Close()
FreeImage image

Cls
Flip

moviefile$ = "GFX\menu\startup_TSS"
BlitzMovie_Open(moviefile$+".avi") ;Get movie size
moview = BlitzMovie_GetWidth()
movieh = BlitzMovie_GetHeight()
BlitzMovie_Close()
image = CreateImage(moview, movieh)
SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
SplashScreenVideo = BlitzMovie_Play()
SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
Repeat
Cls
ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
Expand All @@ -11302,6 +11324,7 @@ Function PlayStartupVideos()
StopStream_Strict(SplashScreenAudio)
BlitzMovie_Stop()
BlitzMovie_Close()

FreeTexture Texture
FreeEntity Quad
FreeEntity Cam
Expand Down
2 changes: 1 addition & 1 deletion MapSystem.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7273,7 +7273,7 @@ Function CreateMap()
spacing = 8.0
If MapTemp(x, y)>0 Then
If (Floor((x + y) / 2.0) = Ceil((x + y) / 2.0)) Then
If zone = 2 Then temp = 2 Else temp=0
If r\zone = 2 Then temp = 2 Else temp=0

If MapTemp(x + 1, y) Then
d.Doors = CreateDoor(r\zone, Float(x) * spacing + spacing / 2.0, 0, Float(y) * spacing, 90, r, Max(Rand(-3, 1), 0), temp)
Expand Down
93 changes: 23 additions & 70 deletions UpdateEvents.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2406,76 +2406,29 @@ Function UpdateEvents()

EntityPick(Camera, 1.5)

For i = 1 To 5 Step 2
If PickedEntity() = e\room\Objects[i] Then
DrawHandIcon = True
If MouseHit1 Then GrabbedEntity = e\room\Objects[i]

If e\EventState = 0 Then
If i = 3 Then
e\EventState = Max(e\EventState,1)
PlaySound_Strict HorrorSFX(7)
PlaySound_Strict LeverSFX
EndIf
EndIf
End If

Local prevpitch# = EntityPitch(e\room\Objects[i])

If MouseDown1 Or MouseHit1 Then
If GrabbedEntity <> 0 Then
If GrabbedEntity = e\room\Objects[i] Then
DrawHandIcon = True
TurnEntity(e\room\Objects[i], mouse_y_speed_1 * 2.5, 0, 0)
RotateEntity(GrabbedEntity, Max(Min(EntityPitch(e\room\Objects[i]), 85), -85), EntityYaw(e\room\Objects[i]), 0)

DrawArrowIcon(0) = True
DrawArrowIcon(2) = True

EndIf
EndIf
Else
If EntityPitch(e\room\Objects[i]) > 0 Then
RotateEntity(e\room\Objects[i], CurveValue(85, EntityPitch(e\room\Objects[i]), 10), EntityYaw(e\room\Objects[i]), 0)
Else
RotateEntity(e\room\Objects[i], CurveValue(-85, EntityPitch(e\room\Objects[i]), 10), EntityYaw(e\room\Objects[i]), 0)
EndIf
GrabbedEntity = 0
End If

If EntityPitch(e\room\Objects[i]) > 83 Then
If prevpitch =< 83 Then PlaySound2(LeverSFX, Camera, e\room\Objects[i])
If i = 3 Then
SecondaryLightOn = CurveValue(1.0, SecondaryLightOn, 10.0)
If prevpitch =< 83 Then
PlaySound2(LightSFX, Camera, e\room\Objects[i])
;For r.Rooms = Each Rooms
; For z = 0 To MaxRoomLights-1
; If r\LightSprites[z] <> 0 Then ShowEntity r\LightSprites[z]
; Next
;Next
EndIf
Else
RemoteDoorOn = True
EndIf
ElseIf EntityPitch(e\room\Objects[i]) < -83

If prevpitch => -83 Then PlaySound2(LeverSFX, Camera, e\room\Objects[i])
If i = 3 Then
If prevpitch => -83 Then
PlaySound2(LightSFX, Camera, e\room\Objects[i])
;For r.Rooms = Each Rooms
; For z = 0 To MaxRoomLights-1
; If r\LightSprites[z] <> 0 Then HideEntity r\LightSprites[z]
; Next
;Next
EndIf
SecondaryLightOn = CurveValue(0.0, SecondaryLightOn, 10.0)
Else
RemoteDoorOn = False
EndIf
EndIf
Next
If PickedEntity() = e\room\Objects[3]
If e\EventState = 0
e\EventState = Max(e\EventState,1)
PlaySound_Strict HorrorSFX(7)
PlaySound_Strict LeverSFX
EndIf
EndIf

;Primary Lighting
UpdateLever(e\room\Objects[1])

;Secondary Lighting
Local prevstate2 = e\EventState2
e\EventState2 = UpdateLever(e\room\Objects[3])
If (prevstate2 <> e\EventState2) And e\EventState>0 Then PlaySound2(LightSFX, Camera, e\room\Objects[3])
If e\EventState2
SecondaryLightOn = CurveValue(1.0, SecondaryLightOn, 10.0)
Else
SecondaryLightOn = CurveValue(0.0, SecondaryLightOn, 10.0)
EndIf

;Remote Door Control
RemoteDoorOn = UpdateLever(e\room\Objects[5])

If e\EventState > 0 And e\EventState < 200 Then
e\EventState = e\EventState + FPSfactor
Expand Down

0 comments on commit eba25b0

Please sign in to comment.