parent
3c90b71e12
commit
6f674df510
15 changed files with 42 additions and 27 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
@ -13,7 +13,7 @@ var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||||
@onready var teddyAuthority = get_multiplayer_authority()
|
@onready var teddyAuthority = get_multiplayer_authority()
|
||||||
var selfTeddy
|
var selfTeddy
|
||||||
var teddyParent
|
var teddyParent
|
||||||
|
var menuOpen = false
|
||||||
var globalscene
|
var globalscene
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
@ -37,16 +37,16 @@ func _unhandled_input(event):
|
||||||
neck.rotate_y(-event.relative.x * mousesense)
|
neck.rotate_y(-event.relative.x * mousesense)
|
||||||
camera.rotate_x(-event.relative.y * mousesense)
|
camera.rotate_x(-event.relative.y * mousesense)
|
||||||
camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-50), deg_to_rad(60))
|
camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-50), deg_to_rad(60))
|
||||||
if Global.menuOpen == false:
|
if menuOpen == false:
|
||||||
if Input.is_action_just_pressed("menu"):
|
if Input.is_action_just_pressed("menu"):
|
||||||
Global.menuOpen = true
|
menuOpen = true
|
||||||
var scene_trs = load("res://scenes/mainmenu.tscn")
|
var scene_trs = load("res://scenes/mainmenu.tscn")
|
||||||
var scene = scene_trs.instantiate()
|
var scene = scene_trs.instantiate()
|
||||||
globalscene = scene
|
globalscene = scene
|
||||||
add_child(scene)
|
add_child(scene)
|
||||||
elif Global.menuOpen == true:
|
elif menuOpen == true:
|
||||||
if Input.is_action_just_pressed("menu"):
|
if Input.is_action_just_pressed("menu"):
|
||||||
Global.menuOpen = false
|
menuOpen = false
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
if globalscene:
|
if globalscene:
|
||||||
globalscene.queue_free()
|
globalscene.queue_free()
|
||||||
|
@ -97,7 +97,7 @@ func _physics_process(delta):
|
||||||
velocity.x = 0
|
velocity.x = 0
|
||||||
velocity.z = 0
|
velocity.z = 0
|
||||||
if Input.is_action_just_pressed("shoot"):
|
if Input.is_action_just_pressed("shoot"):
|
||||||
if Global.menuOpen == false:
|
if menuOpen == false:
|
||||||
if Global.multiplayerCurrent == true:
|
if Global.multiplayerCurrent == true:
|
||||||
rpc("shoot_bullet")
|
rpc("shoot_bullet")
|
||||||
shoot_bullet()
|
shoot_bullet()
|
||||||
|
|
|
@ -127,7 +127,6 @@ texture_format/bptc=false
|
||||||
texture_format/s3tc=true
|
texture_format/s3tc=true
|
||||||
texture_format/etc=false
|
texture_format/etc=false
|
||||||
texture_format/etc2=false
|
texture_format/etc2=false
|
||||||
texture_format/no_bptc_fallbacks=true
|
|
||||||
binary_format/architecture="x86_64"
|
binary_format/architecture="x86_64"
|
||||||
ssh_remote_deploy/enabled=false
|
ssh_remote_deploy/enabled=false
|
||||||
ssh_remote_deploy/host="user@host_ip"
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dnobq0anmbln8"
|
uid="uid://dnobq0anmbln8"
|
||||||
|
path.s3tc="res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"
|
path.etc2="res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/Wood050_2K_Color.jpg"
|
source_file="res://objects/toyland/Wood050_2K_Color.jpg"
|
||||||
dest_files=["res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"]
|
dest_files=["res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.s3tc.ctex", "res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cmhq2gjngssxg"
|
uid="uid://cmhq2gjngssxg"
|
||||||
|
path.s3tc="res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"
|
path.etc2="res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/newplaster.jpg"
|
source_file="res://objects/toyland/newplaster.jpg"
|
||||||
dest_files=["res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"]
|
dest_files=["res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.s3tc.ctex", "res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://c4brgjvonnjkr"
|
uid="uid://c4brgjvonnjkr"
|
||||||
|
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"
|
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
generator_parameters={}
|
generator_parameters={}
|
||||||
|
@ -13,7 +14,7 @@ generator_parameters={}
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png"
|
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png"
|
||||||
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"]
|
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.s3tc.ctex", "res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://ql40b60xucke"
|
uid="uid://ql40b60xucke"
|
||||||
|
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"
|
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
generator_parameters={}
|
generator_parameters={}
|
||||||
|
@ -13,7 +14,7 @@ generator_parameters={}
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png"
|
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png"
|
||||||
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"]
|
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.s3tc.ctex", "res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cj28kq4i36gcg"
|
uid="uid://cj28kq4i36gcg"
|
||||||
|
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"
|
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
generator_parameters={}
|
generator_parameters={}
|
||||||
|
@ -13,7 +14,7 @@ generator_parameters={}
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png"
|
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png"
|
||||||
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"]
|
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.s3tc.ctex", "res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://co6sxyhce6s7"
|
uid="uid://co6sxyhce6s7"
|
||||||
|
path.s3tc="res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"
|
path.etc2="res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/windows_xp_bliss-wide.jpg"
|
source_file="res://objects/toyland/windows_xp_bliss-wide.jpg"
|
||||||
dest_files=["res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"]
|
dest_files=["res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.s3tc.ctex", "res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b6f2baaxv23qx"
|
uid="uid://b6f2baaxv23qx"
|
||||||
|
path.s3tc="res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.s3tc.ctex"
|
||||||
path.etc2="res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"
|
path.etc2="res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"imported_formats": ["etc2_astc"],
|
"imported_formats": ["s3tc_bptc", "etc2_astc"],
|
||||||
"vram_texture": true
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://objects/toyland/woodfloor4k.jpg.001.jpg"
|
source_file="res://objects/toyland/woodfloor4k.jpg.001.jpg"
|
||||||
dest_files=["res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"]
|
dest_files=["res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.s3tc.ctex", "res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|
|
@ -74,3 +74,7 @@ console_send={
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
textures/vram_compression/import_s3tc_bptc=true
|
||||||
|
|
|
@ -12,7 +12,7 @@ func _process(delta):
|
||||||
self.queue_free()
|
self.queue_free()
|
||||||
if Input.is_action_just_pressed("console_send"):
|
if Input.is_action_just_pressed("console_send"):
|
||||||
Global.consoleCommand = $consoleEdit.text
|
Global.consoleCommand = $consoleEdit.text
|
||||||
print (Global.consoleCommand)
|
print ("Console command run: ", Global.consoleCommand)
|
||||||
run_command(Global.consoleCommand)
|
run_command(Global.consoleCommand)
|
||||||
|
|
||||||
func run_command(command):
|
func run_command(command):
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
var mouseSensitivity = 0.01 # Unless otherwise changed by user in settings
|
var mouseSensitivity = 0.01 # Unless otherwise changed by user in settings
|
||||||
var playingGame = false # Should be true while in a map, set by menus
|
var playingGame = false # Should be true while in a map, set by menus
|
||||||
var menuOpen = false # Whether or not the in-game menu is active
|
|
||||||
var fatigue = 100 # Makes it so you can't run forever, you have limited energy
|
var fatigue = 100 # Makes it so you can't run forever, you have limited energy
|
||||||
var playerHealth = 100 # If zero, the player dies. Bullets cause damage
|
var playerHealth = 100 # If zero, the player dies. Bullets cause damage
|
||||||
var playerDead = false # Defined by Global.player_dead()
|
var playerDead = false # Defined by Global.player_dead()
|
||||||
|
|
|
@ -22,6 +22,7 @@ func _on_host_button_pressed():
|
||||||
|
|
||||||
|
|
||||||
func _on_join_button_pressed():
|
func _on_join_button_pressed():
|
||||||
|
peer.close()
|
||||||
var IPADD
|
var IPADD
|
||||||
var PORT
|
var PORT
|
||||||
var intPORT
|
var intPORT
|
||||||
|
@ -41,13 +42,15 @@ func _on_join_button_pressed():
|
||||||
$errorLabel.text = resultString
|
$errorLabel.text = resultString
|
||||||
prints("Creating client result:", result)
|
prints("Creating client result:", result)
|
||||||
if result != OK:
|
if result != OK:
|
||||||
printerr("Did NOT connect to server")
|
printerr("Failed to create client object, please report to Paul/Techwizz")
|
||||||
$errorLabel.text = "Did NOT connect to server"
|
$errorLabel.text = "Failed to create client object, please report to Paul/Techwizz"
|
||||||
if result == OK:
|
if result == OK:
|
||||||
print("Connecting to server at IP ", IPADD, ":", intPORT, "...")
|
print("Connecting to server at IP ", IPADD, ":", intPORT, "...")
|
||||||
$errorLabel.text = "Connecting to server..."
|
$errorLabel.text = "Connecting to server..."
|
||||||
multiplayer.multiplayer_peer = peer
|
multiplayer.multiplayer_peer = peer
|
||||||
|
await get_tree().create_timer(5).timeout
|
||||||
|
printerr("FAILED TO CONNECT, CHECK INFO THEN TRY AGAIN")
|
||||||
|
$errorLabel.text = "FAILED TO CONNECT, CHECK INFO THEN TRY AGAIN"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ func create_server(port, maxPlayers):
|
||||||
add_player_node(new_peer_id)
|
add_player_node(new_peer_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func load_map(map):
|
func load_map(map):
|
||||||
Global.multiplayerCurrent = true
|
Global.multiplayerCurrent = true
|
||||||
get_tree().change_scene_to_file(map)
|
get_tree().change_scene_to_file(map)
|
||||||
|
@ -52,3 +53,6 @@ func add_previously_connected_player_characters(peer_ids):
|
||||||
for peer_id in peer_ids:
|
for peer_id in peer_ids:
|
||||||
add_player_node(peer_id)
|
add_player_node(peer_id)
|
||||||
|
|
||||||
|
@rpc
|
||||||
|
func disconnect_peer(peer_id):
|
||||||
|
peer_id.queue_free()
|
||||||
|
|
Loading…
Reference in a new issue