model loading
the uvs are currently incorrect i think but it loads!
This commit is contained in:
parent
9164fbbf2e
commit
d7a0650183
7 changed files with 876 additions and 18 deletions
68
options.ini
Normal file
68
options.ini
Normal file
|
@ -0,0 +1,68 @@
|
|||
[options]
|
||||
width = 1280
|
||||
height = 720
|
||||
fullscreen = false
|
||||
borderless windowed = false
|
||||
gfx driver = 2
|
||||
audio driver = 0
|
||||
brightness = 50
|
||||
screengamma = 1.0
|
||||
show FPS = 0
|
||||
framelimit = 0
|
||||
vsync = 1
|
||||
mouse sensitivity = 0.0
|
||||
invert mouse y = 0
|
||||
mouse smoothing = 1.0
|
||||
camera fog near = 0.5
|
||||
camera fog far = 6.0
|
||||
fog r = 0
|
||||
fog g = 0
|
||||
fog b = 0
|
||||
map size = 18
|
||||
achievement popup enabled = 1
|
||||
bump mapping enabled = 1
|
||||
anisotropy = 0
|
||||
antialias = 1
|
||||
HUD enabled = 1
|
||||
intro enabled = 1
|
||||
room lights enabled = 1
|
||||
texture details = 3
|
||||
16bit = false
|
||||
antialiased text = 0
|
||||
particle amount = 2
|
||||
enable vram = 0
|
||||
check for updates = true
|
||||
play startup video = true
|
||||
|
||||
[audio]
|
||||
music volume = 0.5
|
||||
sound volume = 1.0
|
||||
enable user tracks = 1
|
||||
user track setting = 1
|
||||
sfx release = 1
|
||||
|
||||
[binds]
|
||||
Right key = 32
|
||||
Left key = 30
|
||||
Up key = 17
|
||||
Down key = 31
|
||||
Blink key = 57
|
||||
Sprint key = 42
|
||||
Inventory key = 15
|
||||
Crouch key = 29
|
||||
Save key = 63
|
||||
Console key = 61
|
||||
|
||||
[launcher]
|
||||
launcher width = 640
|
||||
launcher height = 480
|
||||
launcher enabled = true
|
||||
|
||||
[console]
|
||||
enabled = 0
|
||||
auto opening = 0
|
||||
|
||||
[map creator]
|
||||
resolution select = 1
|
||||
width=1024
|
||||
height=768
|
|
@ -18,6 +18,7 @@ config/icon="res://icon.svg"
|
|||
[autoload]
|
||||
|
||||
Global="*res://src/Global.gd"
|
||||
Options="*res://src/Options.gd"
|
||||
DebugMenu="*res://addons/debug_menu/debug_menu.tscn"
|
||||
|
||||
[editor_plugins]
|
||||
|
|
|
@ -7,12 +7,14 @@ var videoToPlay: String
|
|||
var clickSound: AudioStreamPlayer
|
||||
|
||||
func GetTextureFromCache(name:String):
|
||||
if textureCache.has(name):
|
||||
return textureCache.get(name)
|
||||
var fixedName = name.replace("\\", "/")
|
||||
if textureCache.has(fixedName):
|
||||
return textureCache.get(fixedName)
|
||||
return null
|
||||
|
||||
func LoadTexture(name:String):
|
||||
return textureCache.get_or_add(name, load(str("res://", name.replace("\\", "/"))))
|
||||
var fixedName = name.replace("\\", "/")
|
||||
return textureCache.get_or_add(fixedName, load(str("res://", fixedName)))
|
||||
|
||||
func _ready():
|
||||
clickSound = AudioStreamPlayer.new()
|
||||
|
|
751
src/MapSystem.gd
Normal file
751
src/MapSystem.gd
Normal file
|
@ -0,0 +1,751 @@
|
|||
class MapSystem
|
||||
|
||||
const RandomSeed = 59395743
|
||||
|
||||
static func CreateMap()
|
||||
#DebugLog ("Generating a map using the seed " + RandomSeed)
|
||||
|
||||
#I_Zone\Transition[0] = 13
|
||||
#I_Zone\Transition[1] = 7
|
||||
#I_Zone\HasCustomForest = False
|
||||
#I_Zone\HasCustomMT = False
|
||||
|
||||
Local x%, y%, temp%
|
||||
Local i%, x2%, y2%
|
||||
Local width%, height%
|
||||
|
||||
Local zone%
|
||||
|
||||
SeedRnd GenerateSeedNumber(RandomSeed)
|
||||
|
||||
Dim MapName$(MapWidth, MapHeight)
|
||||
|
||||
Dim MapRoomID%(ROOM4 + 1)
|
||||
|
||||
x = Floor(MapWidth / 2)
|
||||
y = MapHeight - 2;Rand(3, 5)
|
||||
|
||||
For i = y To MapHeight - 1
|
||||
MapTemp(x, i) = True
|
||||
Next
|
||||
|
||||
Repeat
|
||||
width = Rand(10, 15)
|
||||
|
||||
If x > MapWidth*0.6 Then
|
||||
width = -width
|
||||
ElseIf x > MapWidth*0.4
|
||||
x = x-width/2
|
||||
EndIf
|
||||
|
||||
;make sure the hallway doesn't go outside the array
|
||||
If x+width > MapWidth-3 Then
|
||||
;x = -width+MapWidth-4
|
||||
|
||||
width=MapWidth-3-x
|
||||
ElseIf x+width < 2
|
||||
|
||||
;x = 3-width
|
||||
width=-x+2
|
||||
EndIf
|
||||
|
||||
x = Min(x, x + width)
|
||||
width = Abs(width)
|
||||
For i = x To x + width
|
||||
MapTemp(Min(i,MapWidth), y) = True
|
||||
Next
|
||||
|
||||
height = Rand(3, 4)
|
||||
If y - height < 1 Then height = y-1
|
||||
|
||||
yhallways = Rand(4,5)
|
||||
|
||||
If GetZone(y-height)<>GetZone(y-height+1) Then height=height-1
|
||||
|
||||
For i = 1 To yhallways
|
||||
|
||||
x2 = Max(Min(Rand(x, x + width-1),MapWidth-2),2)
|
||||
While MapTemp(x2, y - 1) Or MapTemp(x2 - 1, y - 1) Or MapTemp(x2 + 1, y - 1)
|
||||
x2=x2+1
|
||||
Wend
|
||||
|
||||
If x2<x+width Then
|
||||
If i = 1 Then
|
||||
tempheight = height
|
||||
If Rand(2)=1 Then x2 = x Else x2 = x+width
|
||||
Else
|
||||
tempheight = Rand(1,height)
|
||||
EndIf
|
||||
|
||||
For y2 = y - tempheight To y
|
||||
If GetZone(y2)<>GetZone(y2+1) Then ;a room leading from zone to another
|
||||
MapTemp(x2, y2) = 255
|
||||
Else
|
||||
MapTemp(x2, y2) = True
|
||||
EndIf
|
||||
Next
|
||||
|
||||
If tempheight = height Then temp = x2
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
x = temp
|
||||
y = y - height
|
||||
Until y < 2
|
||||
|
||||
|
||||
Local ZoneAmount=3
|
||||
Local Room1Amount%[3], Room2Amount%[3],Room2CAmount%[3],Room3Amount%[3],Room4Amount%[3]
|
||||
|
||||
;count the amount of rooms
|
||||
For y = 1 To MapHeight - 1
|
||||
zone% = GetZone(y)
|
||||
|
||||
For x = 1 To MapWidth - 1
|
||||
If MapTemp(x, y) > 0 Then
|
||||
temp = Min(MapTemp(x + 1, y),1) + Min(MapTemp(x - 1, y),1)
|
||||
temp = temp + Min(MapTemp(x, y + 1),1) + Min(MapTemp(x, y - 1),1)
|
||||
If MapTemp(x,y)<255 Then MapTemp(x, y) = temp
|
||||
Select MapTemp(x,y)
|
||||
Case 1
|
||||
Room1Amount[zone]=Room1Amount[zone]+1
|
||||
Case 2
|
||||
If Min(MapTemp(x + 1, y),1) + Min(MapTemp(x - 1, y),1)= 2 Then
|
||||
Room2Amount[zone]=Room2Amount[zone]+1
|
||||
ElseIf Min(MapTemp(x, y + 1),1) + Min(MapTemp(x , y - 1),1)= 2
|
||||
Room2Amount[zone]=Room2Amount[zone]+1
|
||||
Else
|
||||
Room2CAmount[zone] = Room2CAmount[zone]+1
|
||||
EndIf
|
||||
Case 3
|
||||
Room3Amount[zone]=Room3Amount[zone]+1
|
||||
Case 4
|
||||
Room4Amount[zone]=Room4Amount[zone]+1
|
||||
End Select
|
||||
EndIf
|
||||
Next
|
||||
Next
|
||||
|
||||
;force more room1s (if needed)
|
||||
For i = 0 To 2
|
||||
;need more rooms if there are less than 5 of them
|
||||
temp = -Room1Amount[i]+5
|
||||
|
||||
If temp > 0 Then
|
||||
|
||||
For y = (MapHeight/ZoneAmount)*(2-i)+1 To ((MapHeight/ZoneAmount) * ((2-i)+1.0))-2
|
||||
|
||||
For x = 2 To MapWidth - 2
|
||||
If MapTemp(x, y) = 0 Then
|
||||
|
||||
If (Min(MapTemp(x + 1, y),1) + Min(MapTemp(x - 1, y),1) + Min(MapTemp(x, y + 1),1) + Min(MapTemp(x, y - 1),1)) = 1 Then
|
||||
;If Rand(4)=1 Then
|
||||
|
||||
If MapTemp(x + 1, y) Then
|
||||
x2 = x+1 : y2 = y
|
||||
ElseIf MapTemp(x - 1, y)
|
||||
x2 = x-1 : y2 = y
|
||||
ElseIf MapTemp(x, y+1)
|
||||
x2 = x : y2 = y+1
|
||||
ElseIf MapTemp(x, y-1)
|
||||
x2 = x : y2 = y-1
|
||||
EndIf
|
||||
|
||||
placed = False
|
||||
If MapTemp(x2,y2)>1 And MapTemp(x2,y2)<4 Then
|
||||
Select MapTemp(x2,y2)
|
||||
Case 2
|
||||
If Min(MapTemp(x2 + 1, y2),1) + Min(MapTemp(x2 - 1, y2),1)= 2 Then
|
||||
Room2Amount[i]=Room2Amount[i]-1
|
||||
Room3Amount[i]=Room3Amount[i]+1
|
||||
placed = True
|
||||
ElseIf Min(MapTemp(x2, y2 + 1),1) + Min(MapTemp(x2, y2 - 1),1)= 2
|
||||
Room2Amount[i]=Room2Amount[i]-1
|
||||
Room3Amount[i]=Room3Amount[i]+1
|
||||
placed = True
|
||||
EndIf
|
||||
Case 3
|
||||
Room3Amount[i]=Room3Amount[i]-1
|
||||
Room4Amount[i]=Room4Amount[i]+1
|
||||
placed = True
|
||||
End Select
|
||||
|
||||
If placed Then
|
||||
MapTemp(x2,y2)=MapTemp(x2,y2)+1
|
||||
|
||||
MapTemp(x, y) = 1
|
||||
Room1Amount[i] = Room1Amount[i]+1
|
||||
|
||||
temp=temp-1
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
If temp = 0 Then Exit
|
||||
Next
|
||||
If temp = 0 Then Exit
|
||||
Next
|
||||
EndIf
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;force more room4s and room2Cs
|
||||
For i = 0 To 2
|
||||
|
||||
Select i
|
||||
Case 2
|
||||
zone=2
|
||||
temp2=MapHeight/3;-1
|
||||
Case 1
|
||||
zone=MapHeight/3+1
|
||||
temp2=MapHeight*(2.0/3.0)-1
|
||||
Case 0
|
||||
zone=MapHeight*(2.0/3.0)+1
|
||||
temp2=MapHeight-2
|
||||
End Select
|
||||
|
||||
If Room4Amount[i]<1 Then ;we want at least 1 ROOM4
|
||||
DebugLog "forcing a ROOM4 into zone "+i
|
||||
temp=0
|
||||
|
||||
For y = zone To temp2
|
||||
For x = 2 To MapWidth - 2
|
||||
If MapTemp(x,y)=3 Then
|
||||
Select 0 ;see if adding a ROOM1 is possible
|
||||
Case (MapTemp(x+1,y) Or MapTemp(x+1,y+1) Or MapTemp(x+1,y-1) Or MapTemp(x+2,y))
|
||||
MapTemp(x+1,y)=1
|
||||
temp=1
|
||||
Case (MapTemp(x-1,y) Or MapTemp(x-1,y+1) Or MapTemp(x-1,y-1) Or MapTemp(x-2,y))
|
||||
MapTemp(x-1,y)=1
|
||||
temp=1
|
||||
Case (MapTemp(x,y+1) Or MapTemp(x+1,y+1) Or MapTemp(x-1,y+1) Or MapTemp(x,y+2))
|
||||
MapTemp(x,y+1)=1
|
||||
temp=1
|
||||
Case (MapTemp(x,y-1) Or MapTemp(x+1,y-1) Or MapTemp(x-1,y-1) Or MapTemp(x,y-2))
|
||||
MapTemp(x,y-1)=1
|
||||
temp=1
|
||||
End Select
|
||||
If temp=1 Then
|
||||
MapTemp(x,y)=4 ;turn this room into a ROOM4
|
||||
DebugLog "ROOM4 forced into slot ("+x+", "+y+")"
|
||||
Room4Amount[i]=Room4Amount[i]+1
|
||||
Room3Amount[i]=Room3Amount[i]-1
|
||||
Room1Amount[i]=Room1Amount[i]+1
|
||||
EndIf
|
||||
EndIf
|
||||
If temp=1 Then Exit
|
||||
Next
|
||||
If temp=1 Then Exit
|
||||
Next
|
||||
|
||||
If temp=0 Then DebugLog "Couldn't place ROOM4 in zone "+i
|
||||
EndIf
|
||||
|
||||
If Room2CAmount[i]<1 Then ;we want at least 1 ROOM2C
|
||||
DebugLog "forcing a ROOM2C into zone "+i
|
||||
temp=0
|
||||
|
||||
zone=zone+1
|
||||
temp2=temp2-1
|
||||
|
||||
For y = zone To temp2
|
||||
For x = 3 To MapWidth - 3
|
||||
If MapTemp(x,y)=1 Then
|
||||
Select True ;see if adding some rooms is possible
|
||||
Case MapTemp(x-1,y)>0
|
||||
If (MapTemp(x,y-1)+MapTemp(x,y+1)+MapTemp(x+2,y))=0 Then
|
||||
If (MapTemp(x+1,y-2)+MapTemp(x+2,y-1)+MapTemp(x+1,y-1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x+1,y)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x+1)+", "+(y)+")"
|
||||
MapTemp(x+1,y-1)=1
|
||||
temp=1
|
||||
Else If (MapTemp(x+1,y+2)+MapTemp(x+2,y+1)+MapTemp(x+1,y+1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x+1,y)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x+1)+", "+(y)+")"
|
||||
MapTemp(x+1,y+1)=1
|
||||
temp=1
|
||||
EndIf
|
||||
EndIf
|
||||
Case MapTemp(x+1,y)>0
|
||||
If (MapTemp(x,y-1)+MapTemp(x,y+1)+MapTemp(x-2,y))=0 Then
|
||||
If (MapTemp(x-1,y-2)+MapTemp(x-2,y-1)+MapTemp(x-1,y-1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x-1,y)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x-1)+", "+(y)+")"
|
||||
MapTemp(x-1,y-1)=1
|
||||
temp=1
|
||||
Else If (MapTemp(x-1,y+2)+MapTemp(x-2,y+1)+MapTemp(x-1,y+1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x-1,y)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x-1)+", "+(y)+")"
|
||||
MapTemp(x-1,y+1)=1
|
||||
temp=1
|
||||
EndIf
|
||||
EndIf
|
||||
Case MapTemp(x,y-1)>0
|
||||
If (MapTemp(x-1,y)+MapTemp(x+1,y)+MapTemp(x,y+2))=0 Then
|
||||
If (MapTemp(x-2,y+1)+MapTemp(x-1,y+2)+MapTemp(x-1,y+1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x,y+1)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x)+", "+(y+1)+")"
|
||||
MapTemp(x-1,y+1)=1
|
||||
temp=1
|
||||
Else If (MapTemp(x+2,y+1)+MapTemp(x+1,y+2)+MapTemp(x+1,y+1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x,y+1)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x)+", "+(y+1)+")"
|
||||
MapTemp(x+1,y+1)=1
|
||||
temp=1
|
||||
EndIf
|
||||
EndIf
|
||||
Case MapTemp(x,y+1)>0
|
||||
If (MapTemp(x-1,y)+MapTemp(x+1,y)+MapTemp(x,y-2))=0 Then
|
||||
If (MapTemp(x-2,y-1)+MapTemp(x-1,y-2)+MapTemp(x-1,y-1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x,y-1)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x)+", "+(y-1)+")"
|
||||
MapTemp(x-1,y-1)=1
|
||||
temp=1
|
||||
Else If (MapTemp(x+2,y-1)+MapTemp(x+1,y-2)+MapTemp(x+1,y-1))=0 Then
|
||||
MapTemp(x,y)=2
|
||||
MapTemp(x,y-1)=2
|
||||
DebugLog "ROOM2C forced into slot ("+(x)+", "+(y-1)+")"
|
||||
MapTemp(x+1,y-1)=1
|
||||
temp=1
|
||||
EndIf
|
||||
EndIf
|
||||
End Select
|
||||
If temp=1 Then
|
||||
Room2CAmount[i]=Room2CAmount[i]+1
|
||||
Room2Amount[i]=Room2Amount[i]+1
|
||||
EndIf
|
||||
EndIf
|
||||
If temp=1 Then Exit
|
||||
Next
|
||||
If temp=1 Then Exit
|
||||
Next
|
||||
|
||||
If temp=0 Then DebugLog "Couldn't place ROOM2C in zone "+i
|
||||
EndIf
|
||||
|
||||
Next
|
||||
|
||||
Local MaxRooms% = 55*MapWidth/20
|
||||
MaxRooms=Max(MaxRooms,Room1Amount[0]+Room1Amount[1]+Room1Amount[2]+1)
|
||||
MaxRooms=Max(MaxRooms,Room2Amount[0]+Room2Amount[1]+Room2Amount[2]+1)
|
||||
MaxRooms=Max(MaxRooms,Room2CAmount[0]+Room2CAmount[1]+Room2CAmount[2]+1)
|
||||
MaxRooms=Max(MaxRooms,Room3Amount[0]+Room3Amount[1]+Room3Amount[2]+1)
|
||||
MaxRooms=Max(MaxRooms,Room4Amount[0]+Room4Amount[1]+Room4Amount[2]+1)
|
||||
Dim MapRoom$(ROOM4 + 1, MaxRooms)
|
||||
|
||||
|
||||
;zone 1 --------------------------------------------------------------------------------------------------
|
||||
|
||||
Local min_pos = 1, max_pos = Room1Amount[0]-1
|
||||
|
||||
MapRoom(ROOM1, 0) = "start"
|
||||
SetRoom("roompj", ROOM1, Floor(0.1*Float(Room1Amount[0])),min_pos,max_pos)
|
||||
SetRoom("914", ROOM1, Floor(0.3*Float(Room1Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room1archive",ROOM1,Floor(0.5*Float(Room1Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room205", ROOM1, Floor(0.6*Float(Room1Amount[0])),min_pos,max_pos)
|
||||
|
||||
MapRoom(ROOM2C, 0) = "lockroom"
|
||||
|
||||
min_pos = 1
|
||||
max_pos = Room2Amount[0]-1
|
||||
|
||||
MapRoom(ROOM2, 0) = "room2closets"
|
||||
SetRoom("room2testroom2", ROOM2, Floor(0.1*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2scps", ROOM2, Floor(0.2*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2storage", ROOM2, Floor(0.3*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2gw_b", ROOM2, Floor(0.4*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2sl", ROOM2, Floor(0.5*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room012", ROOM2, Floor(0.55*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2scps2",ROOM2,Floor(0.6*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room1123",ROOM2,Floor(0.7*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
SetRoom("room2elevator",ROOM2,Floor(0.85*Float(Room2Amount[0])),min_pos,max_pos)
|
||||
|
||||
|
||||
MapRoom(ROOM3, Floor(Rnd(0.2,0.8)*Float(Room3Amount[0]))) = "room3storage"
|
||||
|
||||
MapRoom(ROOM2C, Floor(0.5*Float(Room2CAmount[0]))) = "room1162"
|
||||
|
||||
MapRoom(ROOM4, Floor(0.3*Float(Room4Amount[0]))) = "room4info"
|
||||
|
||||
;zone 2 --------------------------------------------------------------------------------------------------
|
||||
|
||||
min_pos = Room1Amount[0]
|
||||
max_pos = Room1Amount[0]+Room1Amount[1]-1
|
||||
|
||||
SetRoom("room079", ROOM1, Room1Amount[0]+Floor(0.15*Float(Room1Amount[1])),min_pos,max_pos)
|
||||
SetRoom("room106", ROOM1, Room1Amount[0]+Floor(0.3*Float(Room1Amount[1])),min_pos,max_pos)
|
||||
SetRoom("008", ROOM1, Room1Amount[0]+Floor(0.4*Float(Room1Amount[1])),min_pos,max_pos)
|
||||
SetRoom("room035", ROOM1, Room1Amount[0]+Floor(0.5*Float(Room1Amount[1])),min_pos,max_pos)
|
||||
SetRoom("coffin", ROOM1, Room1Amount[0]+Floor(0.7*Float(Room1Amount[1])),min_pos,max_pos)
|
||||
|
||||
min_pos = Room2Amount[0]
|
||||
max_pos = Room2Amount[0]+Room2Amount[1]-1
|
||||
|
||||
MapRoom(ROOM2, Room2Amount[0]+Floor(0.1*Float(Room2Amount[1]))) = "room2nuke"
|
||||
SetRoom("room2tunnel", ROOM2, Room2Amount[0]+Floor(0.25*Float(Room2Amount[1])),min_pos,max_pos)
|
||||
SetRoom("room049", ROOM2, Room2Amount[0]+Floor(0.4*Float(Room2Amount[1])),min_pos,max_pos)
|
||||
SetRoom("room2shaft",ROOM2,Room2Amount[0]+Floor(0.6*Float(Room2Amount[1])),min_pos,max_pos)
|
||||
SetRoom("testroom", ROOM2, Room2Amount[0]+Floor(0.7*Float(Room2Amount[1])),min_pos,max_pos)
|
||||
SetRoom("room2servers", ROOM2, Room2Amount[0]+Floor(0.9*Room2Amount[1]),min_pos,max_pos)
|
||||
|
||||
MapRoom(ROOM3, Room3Amount[0]+Floor(0.3*Float(Room3Amount[1]))) = "room513"
|
||||
MapRoom(ROOM3, Room3Amount[0]+Floor(0.6*Float(Room3Amount[1]))) = "room966"
|
||||
|
||||
MapRoom(ROOM2C, Room2CAmount[0]+Floor(0.5*Float(Room2CAmount[1]))) = "room2cpit"
|
||||
|
||||
|
||||
;zone 3 --------------------------------------------------------------------------------------------------
|
||||
|
||||
MapRoom(ROOM1, Room1Amount[0]+Room1Amount[1]+Room1Amount[2]-2) = "exit1"
|
||||
MapRoom(ROOM1, Room1Amount[0]+Room1Amount[1]+Room1Amount[2]-1) = "gateaentrance"
|
||||
MapRoom(ROOM1, Room1Amount[0]+Room1Amount[1]) = "room1lifts"
|
||||
|
||||
min_pos = Room2Amount[0]+Room2Amount[1]
|
||||
max_pos = Room2Amount[0]+Room2Amount[1]+Room2Amount[2]-1
|
||||
|
||||
MapRoom(ROOM2, min_pos+Floor(0.1*Float(Room2Amount[2]))) = "room2poffices"
|
||||
SetRoom("room2cafeteria", ROOM2, min_pos+Floor(0.2*Float(Room2Amount[2])),min_pos,max_pos)
|
||||
SetRoom("room2sroom", ROOM2, min_pos+Floor(0.3*Float(Room2Amount[2])),min_pos,max_pos)
|
||||
SetRoom("room2servers2", ROOM2, min_pos+Floor(0.4*Room2Amount[2]),min_pos,max_pos)
|
||||
SetRoom("room2offices", ROOM2, min_pos+Floor(0.45*Room2Amount[2]),min_pos,max_pos)
|
||||
SetRoom("room2offices4", ROOM2, min_pos+Floor(0.5*Room2Amount[2]),min_pos,max_pos)
|
||||
SetRoom("room860", ROOM2, min_pos+Floor(0.6*Room2Amount[2]),min_pos,max_pos)
|
||||
SetRoom("medibay", ROOM2, min_pos+Floor(0.7*Float(Room2Amount[2])),min_pos,max_pos)
|
||||
SetRoom("room2poffices2", ROOM2, min_pos+Floor(0.8*Room2Amount[2]),min_pos,max_pos)
|
||||
SetRoom("room2offices2", ROOM2, min_pos+Floor(0.9*Float(Room2Amount[2])),min_pos,max_pos)
|
||||
|
||||
MapRoom(ROOM2C, Room2CAmount[0]+Room2CAmount[1]) = "room2ccont"
|
||||
MapRoom(ROOM2C, Room2CAmount[0]+Room2CAmount[1]+1) = "lockroom2"
|
||||
|
||||
MapRoom(ROOM3, Room3Amount[0]+Room3Amount[1]+Floor(0.3*Float(Room3Amount[2]))) = "room3servers"
|
||||
MapRoom(ROOM3, Room3Amount[0]+Room3Amount[1]+Floor(0.7*Float(Room3Amount[2]))) = "room3servers2"
|
||||
;MapRoom(ROOM3, Room3Amount[0]+Room3Amount[1]) = "room3gw"
|
||||
MapRoom(ROOM3, Room3Amount[0]+Room3Amount[1]+Floor(0.5*Float(Room3Amount[2]))) = "room3offices"
|
||||
|
||||
;----------------------- luodaan kartta --------------------------------
|
||||
|
||||
temp = 0
|
||||
Local r.Rooms, spacing# = 8.0
|
||||
For y = MapHeight - 1 To 1 Step - 1
|
||||
|
||||
;zone% = GetZone(y)
|
||||
|
||||
If y < MapHeight/3+1 Then
|
||||
zone=3
|
||||
ElseIf y < MapHeight*(2.0/3.0);-1
|
||||
zone=2
|
||||
Else
|
||||
zone=1
|
||||
EndIf
|
||||
|
||||
For x = 1 To MapWidth - 2
|
||||
If MapTemp(x, y) = 255 Then
|
||||
If y>MapHeight/2 Then ;zone = 2
|
||||
r = CreateRoom(zone, ROOM2, x * 8, 0, y * 8, "checkpoint1")
|
||||
Else ;If zone = 3
|
||||
r = CreateRoom(zone, ROOM2, x * 8, 0, y * 8, "checkpoint2")
|
||||
EndIf
|
||||
ElseIf MapTemp(x, y) > 0
|
||||
|
||||
temp = Min(MapTemp(x + 1, y),1) + Min(MapTemp(x - 1, y),1) + Min(MapTemp(x, y + 1),1) + Min(MapTemp(x, y - 1),1)
|
||||
|
||||
Select temp ;viereisiss<EFBFBD> ruuduissa olevien huoneiden m<EFBFBD><EFBFBD>r<EFBFBD>
|
||||
Case 1
|
||||
If MapRoomID(ROOM1) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM1, MapRoomID(ROOM1)) <> "" Then MapName(x, y) = MapRoom(ROOM1, MapRoomID(ROOM1))
|
||||
EndIf
|
||||
|
||||
r = CreateRoom(zone, ROOM1, x * 8, 0, y * 8, MapName(x, y))
|
||||
If MapTemp(x, y + 1) Then
|
||||
r\angle = 180
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
ElseIf MapTemp(x - 1, y)
|
||||
r\angle = 270
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
ElseIf MapTemp(x + 1, y)
|
||||
r\angle = 90
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
Else
|
||||
r\angle = 0
|
||||
End If
|
||||
MapRoomID(ROOM1)=MapRoomID(ROOM1)+1
|
||||
Case 2
|
||||
If MapTemp(x - 1, y)>0 And MapTemp(x + 1, y)>0 Then
|
||||
If MapRoomID(ROOM2) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM2, MapRoomID(ROOM2)) <> "" Then MapName(x, y) = MapRoom(ROOM2, MapRoomID(ROOM2))
|
||||
EndIf
|
||||
r = CreateRoom(zone, ROOM2, x * 8, 0, y * 8, MapName(x, y))
|
||||
If Rand(2) = 1 Then r\angle = 90 Else r\angle = 270
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
MapRoomID(ROOM2)=MapRoomID(ROOM2)+1
|
||||
ElseIf MapTemp(x, y - 1)>0 And MapTemp(x, y + 1)>0
|
||||
If MapRoomID(ROOM2) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM2, MapRoomID(ROOM2)) <> "" Then MapName(x, y) = MapRoom(ROOM2, MapRoomID(ROOM2))
|
||||
EndIf
|
||||
r = CreateRoom(zone, ROOM2, x * 8, 0, y * 8, MapName(x, y))
|
||||
If Rand(2) = 1 Then r\angle = 180 Else r\angle = 0
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
MapRoomID(ROOM2)=MapRoomID(ROOM2)+1
|
||||
Else
|
||||
If MapRoomID(ROOM2C) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM2C, MapRoomID(ROOM2C)) <> "" Then MapName(x, y) = MapRoom(ROOM2C, MapRoomID(ROOM2C))
|
||||
EndIf
|
||||
|
||||
If MapTemp(x - 1, y)>0 And MapTemp(x, y + 1)>0 Then
|
||||
r = CreateRoom(zone, ROOM2C, x * 8, 0, y * 8, MapName(x, y))
|
||||
r\angle = 180
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
ElseIf MapTemp(x + 1, y)>0 And MapTemp(x, y + 1)>0
|
||||
r = CreateRoom(zone, ROOM2C, x * 8, 0, y * 8, MapName(x, y))
|
||||
r\angle = 90
|
||||
TurnEntity(r\obj, 0, r\angle, 0)
|
||||
ElseIf MapTemp(x - 1, y)>0 And MapTemp(x, y - 1)>0
|
||||
r = CreateRoom(zone, ROOM2C, x * 8, 0, y * 8, MapName(x, y))
|
||||
TurnEntity(r\obj, 0, 270, 0)
|
||||
r\angle = 270
|
||||
Else
|
||||
r = CreateRoom(zone, ROOM2C, x * 8, 0, y * 8, MapName(x, y))
|
||||
EndIf
|
||||
MapRoomID(ROOM2C)=MapRoomID(ROOM2C)+1
|
||||
EndIf
|
||||
Case 3
|
||||
If MapRoomID(ROOM3) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM3, MapRoomID(ROOM3)) <> "" Then MapName(x, y) = MapRoom(ROOM3, MapRoomID(ROOM3))
|
||||
EndIf
|
||||
|
||||
r = CreateRoom(zone, ROOM3, x * 8, 0, y * 8, MapName(x, y))
|
||||
If (Not MapTemp(x, y - 1)) Then
|
||||
TurnEntity(r\obj, 0, 180, 0)
|
||||
r\angle = 180
|
||||
ElseIf (Not MapTemp(x - 1, y))
|
||||
TurnEntity(r\obj, 0, 90, 0)
|
||||
r\angle = 90
|
||||
ElseIf (Not MapTemp(x + 1, y))
|
||||
TurnEntity(r\obj, 0, -90, 0)
|
||||
r\angle = 270
|
||||
End If
|
||||
MapRoomID(ROOM3)=MapRoomID(ROOM3)+1
|
||||
Case 4
|
||||
If MapRoomID(ROOM4) < MaxRooms And MapName(x,y) = "" Then
|
||||
If MapRoom(ROOM4, MapRoomID(ROOM4)) <> "" Then MapName(x, y) = MapRoom(ROOM4, MapRoomID(ROOM4))
|
||||
EndIf
|
||||
|
||||
r = CreateRoom(zone, ROOM4, x * 8, 0, y * 8, MapName(x, y))
|
||||
MapRoomID(ROOM4)=MapRoomID(ROOM4)+1
|
||||
End Select
|
||||
|
||||
EndIf
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
r = CreateRoom(0, ROOM1, (MapWidth-1) * 8, 500, 8, "gatea")
|
||||
MapRoomID(ROOM1)=MapRoomID(ROOM1)+1
|
||||
|
||||
r = CreateRoom(0, ROOM1, (MapWidth-1) * 8, 0, (MapHeight-1) * 8, "pocketdimension")
|
||||
MapRoomID(ROOM1)=MapRoomID(ROOM1)+1
|
||||
|
||||
If IntroEnabled
|
||||
r = CreateRoom(0, ROOM1, 8, 0, (MapHeight-1) * 8, "173")
|
||||
MapRoomID(ROOM1)=MapRoomID(ROOM1)+1
|
||||
EndIf
|
||||
|
||||
r = CreateRoom(0, ROOM1, 8, 800, 0, "dimension1499")
|
||||
MapRoomID(ROOM1)=MapRoomID(ROOM1)+1
|
||||
|
||||
For r.Rooms = Each Rooms
|
||||
PreventRoomOverlap(r)
|
||||
Next
|
||||
|
||||
If 0 Then
|
||||
Repeat
|
||||
Cls
|
||||
For x = 0 To MapWidth - 1
|
||||
For y = 0 To MapHeight - 1
|
||||
If MapTemp(x, y) = 0 Then
|
||||
|
||||
zone=GetZone(y)
|
||||
|
||||
Color 50*zone, 50*zone, 50*zone
|
||||
Rect(x * 32, y * 32, 30, 30)
|
||||
Else
|
||||
If MapTemp(x, y) = 255 Then
|
||||
Color 0,200,0
|
||||
Else If MapTemp(x,y)=4 Then
|
||||
Color 50,50,255
|
||||
Else If MapTemp(x,y)=3 Then
|
||||
Color 50,255,255
|
||||
Else If MapTemp(x,y)=2 Then
|
||||
Color 255,255,50
|
||||
Else
|
||||
Color 255, 255, 255
|
||||
EndIf
|
||||
Rect(x * 32, y * 32, 30, 30)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
For x = 0 To MapWidth - 1
|
||||
For y = 0 To MapHeight - 1
|
||||
|
||||
If MouseX()>x*32 And MouseX()<x*32+32 Then
|
||||
If MouseY()>y*32 And MouseY()<y*32+32 Then
|
||||
Color 255, 0, 0
|
||||
Else
|
||||
Color 200, 200, 200
|
||||
EndIf
|
||||
Else
|
||||
Color 200, 200, 200
|
||||
EndIf
|
||||
|
||||
If MapTemp(x, y) > 0 Then
|
||||
Text x * 32 +2, (y) * 32 + 2,MapTemp(x, y) +" "+ MapName(x,y)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Flip
|
||||
Until KeyHit(28)
|
||||
EndIf
|
||||
|
||||
|
||||
For y = 0 To MapHeight
|
||||
For x = 0 To MapWidth
|
||||
MapTemp(x, y) = Min(MapTemp(x, y),1)
|
||||
Next
|
||||
Next
|
||||
|
||||
Local d.Doors
|
||||
Local shouldSpawnDoor%
|
||||
For y = MapHeight To 0 Step -1
|
||||
|
||||
If y<I_Zone\Transition[1]-1 Then
|
||||
zone=3
|
||||
ElseIf y>=I_Zone\Transition[1]-1 And y<I_Zone\Transition[0]-1 Then
|
||||
zone=2
|
||||
Else
|
||||
zone=1
|
||||
EndIf
|
||||
|
||||
For x = MapWidth To 0 Step -1
|
||||
If MapTemp(x,y) > 0 Then
|
||||
If zone = 2 Then temp=2 Else temp=0
|
||||
|
||||
For r.Rooms = Each Rooms
|
||||
r\angle = WrapAngle(r\angle)
|
||||
If Int(r\x/8.0)=x And Int(r\z/8.0)=y Then
|
||||
shouldSpawnDoor = False
|
||||
Select r\RoomTemplate\Shape
|
||||
Case ROOM1
|
||||
If r\angle=90
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM2
|
||||
If r\angle=90 Or r\angle=270
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM2C
|
||||
If r\angle=0 Or r\angle=90
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM3
|
||||
If r\angle=0 Or r\angle=180 Or r\angle=90
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Default
|
||||
shouldSpawnDoor = True
|
||||
End Select
|
||||
If shouldSpawnDoor
|
||||
If (x+1)<(MapWidth+1)
|
||||
If MapTemp(x + 1, y) > 0 Then
|
||||
d.Doors = CreateDoor(r\zone, Float(x) * spacing + spacing / 2.0, 0, Float(y) * spacing, 90, r, Max(Rand(-3, 1), 0), temp)
|
||||
r\AdjDoor[0] = d
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
shouldSpawnDoor = False
|
||||
Select r\RoomTemplate\Shape
|
||||
Case ROOM1
|
||||
If r\angle=180
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM2
|
||||
If r\angle=0 Or r\angle=180
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM2C
|
||||
If r\angle=180 Or r\angle=90
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Case ROOM3
|
||||
If r\angle=180 Or r\angle=90 Or r\angle=270
|
||||
shouldSpawnDoor = True
|
||||
EndIf
|
||||
Default
|
||||
shouldSpawnDoor = True
|
||||
End Select
|
||||
If shouldSpawnDoor
|
||||
If (y+1)<(MapHeight+1)
|
||||
If MapTemp(x, y + 1) > 0 Then
|
||||
d.Doors = CreateDoor(r\zone, Float(x) * spacing, 0, Float(y) * spacing + spacing / 2.0, 0, r, Max(Rand(-3, 1), 0), temp)
|
||||
r\AdjDoor[3] = d
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
Exit
|
||||
EndIf
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
For r.Rooms = Each Rooms
|
||||
;If r\angle >= 360
|
||||
; r\angle = r\angle-360
|
||||
;EndIf
|
||||
r\angle = WrapAngle(r\angle)
|
||||
r\Adjacent[0]=Null
|
||||
r\Adjacent[1]=Null
|
||||
r\Adjacent[2]=Null
|
||||
r\Adjacent[3]=Null
|
||||
For r2.Rooms = Each Rooms
|
||||
If r<>r2 Then
|
||||
If r2\z=r\z Then
|
||||
If (r2\x)=(r\x+8.0) Then
|
||||
r\Adjacent[0]=r2
|
||||
If r\AdjDoor[0] = Null Then r\AdjDoor[0] = r2\AdjDoor[2]
|
||||
ElseIf (r2\x)=(r\x-8.0)
|
||||
r\Adjacent[2]=r2
|
||||
If r\AdjDoor[2] = Null Then r\AdjDoor[2] = r2\AdjDoor[0]
|
||||
EndIf
|
||||
ElseIf r2\x=r\x Then
|
||||
If (r2\z)=(r\z-8.0) Then
|
||||
r\Adjacent[1]=r2
|
||||
If r\AdjDoor[1] = Null Then r\AdjDoor[1] = r2\AdjDoor[3]
|
||||
ElseIf (r2\z)=(r\z+8.0)
|
||||
r\Adjacent[3]=r2
|
||||
If r\AdjDoor[3] = Null Then r\AdjDoor[3] = r2\AdjDoor[1]
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
If (r\Adjacent[0]<>Null) And (r\Adjacent[1]<>Null) And (r\Adjacent[2]<>Null) And (r\Adjacent[3]<>Null) Then Exit
|
||||
Next
|
||||
Next
|
||||
|
||||
End Function
|
6
src/Options.gd
Normal file
6
src/Options.gd
Normal file
|
@ -0,0 +1,6 @@
|
|||
extends Node
|
||||
|
||||
var options = ConfigFile.new()
|
||||
|
||||
func _ready() -> void:
|
||||
options.load("res://options.ini")
|
|
@ -516,9 +516,9 @@ static func LoadRMesh(parentNode: Node3D, file: String):
|
|||
model.rotation = Vector3(deg_to_rad(temp1), deg_to_rad(temp2), deg_to_rad(temp3))
|
||||
#RotateEntity model,temp1,temp2,temp3
|
||||
#
|
||||
temp1 = reader.readFloat()
|
||||
temp2 = reader.readFloat()
|
||||
temp3 = reader.readFloat()
|
||||
temp1 = reader.readFloat() * WORLD_SCALE
|
||||
temp2 = reader.readFloat() * WORLD_SCALE
|
||||
temp3 = reader.readFloat() * WORLD_SCALE
|
||||
|
||||
model.scale = Vector3(temp1, temp2, temp3)
|
||||
#ScaleEntity model,temp1,temp2,temp3
|
||||
|
|
52
src/X.gd
52
src/X.gd
|
@ -6,30 +6,59 @@ static func LoadModel(filePath: String):
|
|||
var fileLines = file.get_as_text(true).split("\n")
|
||||
|
||||
var meshDataStart = false
|
||||
var indexDataStart = false
|
||||
var meshTextureCoordsStart = false
|
||||
var textureNameStart = false
|
||||
var textureName = ""
|
||||
var texture: Texture2D = null
|
||||
var meshDataLength = -1
|
||||
var uvsDataLength = -1
|
||||
var indexDataLength = -1
|
||||
var verts = PackedVector3Array()
|
||||
var uvs = PackedVector2Array()
|
||||
var indexes = PackedInt32Array()
|
||||
for line in fileLines:
|
||||
if meshDataStart:
|
||||
if meshDataLength == -1:
|
||||
if meshDataStart or indexDataStart:
|
||||
if meshDataStart and meshDataLength == -1:
|
||||
meshDataLength = int(line.strip_edges().split(";")[0])
|
||||
elif verts.size() == meshDataLength:
|
||||
elif indexDataStart and indexDataLength == -1:
|
||||
indexDataLength = int(line.strip_edges().split(";")[0])
|
||||
|
||||
if verts.size() < meshDataLength:
|
||||
elif meshDataStart:
|
||||
var pointData = line.strip_edges().split(";")
|
||||
if pointData.size() == 5:
|
||||
meshDataStart = false
|
||||
indexDataStart = true
|
||||
verts.push_back(Vector3(float(pointData[0]), float(pointData[1]), float(pointData[2])))
|
||||
|
||||
if verts.size() >= meshDataLength and indexes.size() < indexes:
|
||||
elif indexDataStart:
|
||||
var indexParts = line.strip_edges().split(";")
|
||||
var indexData = indexParts.split(",")
|
||||
if indexParts.size() == 4:
|
||||
indexDataStart = false
|
||||
var indexData = indexParts[1].split(",")
|
||||
var amount = int(indexParts[0])
|
||||
for i in range(amount):
|
||||
indexes.push_back(int(indexData[i]))
|
||||
elif textureNameStart:
|
||||
textureName = line.strip_edges().split(";")[0].replace("\"", "")
|
||||
var texturePath = str("GFX/map/Props/", textureName)
|
||||
texture = Global.GetTextureFromCache(texturePath)
|
||||
if not texture:
|
||||
texture = Global.LoadTexture(texturePath)
|
||||
textureNameStart = false
|
||||
elif meshTextureCoordsStart:
|
||||
if uvsDataLength == -1:
|
||||
uvsDataLength = int(line.strip_edges().split(";")[0])
|
||||
else:
|
||||
var uvParts = line.strip_edges().split(";")
|
||||
if uvParts.size() == 4:
|
||||
meshTextureCoordsStart = false
|
||||
uvs.push_back(Vector2(float(uvParts[0]), float(uvParts[1])))
|
||||
|
||||
if line.strip_edges().begins_with("Mesh Skeleton"):
|
||||
if line.strip_edges().contains("Mesh "):
|
||||
meshDataStart = true
|
||||
elif line.strip_edges().contains("TextureFilename"):
|
||||
textureNameStart = true
|
||||
elif line.strip_edges().contains("MeshTextureCoords"):
|
||||
meshTextureCoordsStart = true
|
||||
|
||||
var mesh = MeshInstance3D.new()
|
||||
var arr_mesh = ArrayMesh.new()
|
||||
|
@ -37,14 +66,15 @@ static func LoadModel(filePath: String):
|
|||
arr.resize(Mesh.ARRAY_MAX)
|
||||
|
||||
arr[Mesh.ARRAY_VERTEX]=verts
|
||||
arr[Mesh.ARRAY_TEX_UV]=uvs
|
||||
arr[Mesh.ARRAY_INDEX]=indexes
|
||||
|
||||
var meshInstance = MeshInstance3D.new()
|
||||
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arr)
|
||||
meshInstance.mesh = arr_mesh
|
||||
var mat = StandardMaterial3D.new()
|
||||
mat.albedo_color = Color(randi() % 255 / 255.0, randi() % 255 / 255.0, randi() % 255 / 255.0)
|
||||
#mat.albedo_texture = activeAlbedo
|
||||
#mat.albedo_color = Color(randi() % 255 / 255.0, randi() % 255 / 255.0, randi() % 255 / 255.0)
|
||||
mat.albedo_texture = texture
|
||||
#mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA_DEPTH_PRE_PASS if activeAlbedoHasAlpha else BaseMaterial3D.TRANSPARENCY_DISABLED
|
||||
meshInstance.set_surface_override_material(0, mat)
|
||||
meshInstance.create_trimesh_collision()
|
||||
|
|
Loading…
Add table
Reference in a new issue