Merge branch 'master' of ssh://play.qtechofficial.com:9940/funnymemellama/funnymemellama

This commit is contained in:
zombie maniac 2023-10-01 22:28:06 -04:00
commit d5ee1fe306
Signed by untrusted user: nbrooks211
GPG key ID: F43C85C0DF0C334E
3 changed files with 16 additions and 7 deletions

View file

@ -8,7 +8,10 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
$Speed.text = 'Speed: {0}'.format([$Player.velocity.length()])
var v = $Player.velocity
var hvel = sqrt(v.x ** 2 + v.z ** 2)
var vvel = v.y
$Speed.text = 'Speed: %6.2f, %6.2f' % [hvel, vvel]
func _input(event: InputEvent):

View file

@ -1,12 +1,12 @@
extends CharacterBody3D
# Member variables
const QUAKE = 8 * 0.013888888888888888
const QUAKE = 0.0625
const g = -800 * QUAKE
const MAX_SPEED = 2000 * QUAKE
const FRICTION = 4 * QUAKE
const FRICTION = 4# * QUAKE
const STOP_SPEED = 100 * QUAKE
const ACCEL= 10 * QUAKE
const ACCEL= 10# * QUAKE
const FORWARD_SPEED = 200 * QUAKE
const SIDE_SPEED = 350 * QUAKE
const UP_SPEED = 270 * QUAKE
@ -45,7 +45,6 @@ func _physics_process(delta):
if Input.is_action_pressed("run"):
fmove *= 2.0
smove *= 2.0
upmove *= 2.0
var wishvel = Vector3()
var cam_xform: Transform3D = camera.get_global_transform()
@ -54,7 +53,7 @@ func _physics_process(delta):
wishvel = cam_basis.z * fmove + cam_basis.x * smove
if _noclip:
wishvel.y = upmove
wishvel.y += upmove
# else:
# wishvel.y = upmove

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://cv8621s5oukrb"]
[gd_scene load_steps=12 format=3 uid="uid://cv8621s5oukrb"]
[ext_resource type="PackedScene" uid="uid://dyyf1q12dchhq" path="res://Player.tscn" id="2_jba6q"]
[ext_resource type="ArrayMesh" uid="uid://bqnoaomgwec3w" path="res://assets/maps/mapentities.obj" id="5_wn745"]
@ -16,6 +16,12 @@ font_size = 69
outline_size = 24
outline_color = Color(0, 0, 0, 1)
[sub_resource type="SystemFont" id="SystemFont_4l16k"]
font_names = PackedStringArray("Monospace")
[sub_resource type="LabelSettings" id="LabelSettings_f35h2"]
font = SubResource("SystemFont_4l16k")
[node name="Root" type="Node"]
script = ExtResource("7_2k2sn")
@ -54,3 +60,4 @@ offset_top = 99.0
offset_right = 113.0
offset_bottom = 136.0
text = "SPEED"
label_settings = SubResource("LabelSettings_f35h2")