Page 1 of 1

[1.0.3] MAV in SCP-939's storage area

Posted: Thu Aug 07, 2014 12:49 pm
by Akatos
I keep getting a memory acces violation whenever I use the elevator to the storage area with SCP-939. I can see the loading screen and then the game crashes, so I assume there's some problem with loading the room mesh.

Can anybody confirm?

Re: [1.0.3] MAV in SCP-939's storage area

Posted: Thu Aug 07, 2014 1:40 pm
by ApplePiah
*Plays*

*Finds 939*

*Rides elevator*

"Man this will take some time"

*2 minutes later*

(Memory Access Violation)

I'll make a vid next time.

Re: [1.0.3] MAV in SCP-939's storage area

Posted: Fri Aug 08, 2014 8:15 am
by autotroph
I remember falling down the elevator to 939 once and getting a MAV. Weird; wonder what's causing that. Could be caused by the loading of one of the sounds of 939 or that of the player.

Re: [1.0.3] MAV in SCP-939's storage area

Posted: Sun Aug 10, 2014 10:37 am
by Akatos
Okay, juanjpro has a fix for it.
juanjpro wrote:
aaro4130 wrote:Bump mapping is still broken when going down elevators or on any quick loading screen it will cause a MAV.
That's a bug with SCP-939, where the game does FreeBrush twice, the second time crashes the game.
To fix that, change 939's bump mapping code to this:

Code: Select all

If BumpEnabled Then
	bump1 = LoadTexture_Strict("GFX\npcs\scp-939_licker_normal.png")
	TextureBlend bump1, FE_BUMP
	
	For i = 2 To CountSurfaces(n\obj)
		sf = GetSurface(n\obj,i)
		b = GetSurfaceBrush( sf )
		If b<>0 Then
			t1 = GetBrushTexture(b,0)
			If t1<>0 Then
				Select Lower(StripPath(TextureName(t1)))
					Case "scp-939-licker_diffusetest01.png"
						
						BrushTexture b, bump1, 0, 0
						BrushTexture b, t1, 0, 1
						PaintSurface sf,b
						
						;If StripPath(TextureName(t1)) <> "" Then FreeTexture t1
						;FreeBrush b	
				End Select
				FreeTexture t1
			EndIf
			FreeBrush b
		EndIf
	Next
	FreeTexture bump1
EndIf