Compare commits

...

10 Commits

Author SHA1 Message Date
Hays 2aa142c350 Add model Ak-12 and glock 2024-04-10 00:23:39 +03:00
leca 6fba0c6e58 fix 2024-04-07 21:02:41 +03:00
leca 74b140fb1d changed icon 2024-03-29 22:27:05 +03:00
leca b3040b4de0 fix first bullet 2024-03-27 20:47:54 +03:00
leca 52400f950a fix killed spectator after last player quit 2024-03-27 20:10:19 +03:00
leca b4677e91b9 added tracers 2024-03-27 20:07:26 +03:00
leca fb839f3467 Fixed weapon 2024-03-10 01:01:27 +03:00
leca a1dbbb72a9 moved properties to GameData singleton 2024-03-07 14:46:59 +03:00
leca f18dc4336e fixed typo 2024-03-07 13:24:51 +03:00
leca 0ddfd64bb5 now changing nicknames of killer and victim 2024-03-07 02:00:22 +03:00
21 changed files with 1969 additions and 264 deletions

203
icon.svg
View File

@ -1,203 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="1024"
height="1024"
viewBox="0 0 270.93333 270.93333"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
sodipodi:docname="cs-os-logo.svg"
inkscape:export-filename="cs-os-logo-ink.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="0.38867188"
inkscape:cx="153.08543"
inkscape:cy="596.90452"
inkscape:window-width="1920"
inkscape:window-height="1002"
inkscape:window-x="0"
inkscape:window-y="41"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<sodipodi:guide
position="-16.857078,309.38678"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="-94.074279,294.23623"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<defs
id="defs1">
<linearGradient
id="linearGradient26"
inkscape:collect="always">
<stop
style="stop-color:#8400ff;stop-opacity:1;"
offset="0"
id="stop27" />
<stop
style="stop-color:#8400ff;stop-opacity:0;"
offset="1"
id="stop28" />
</linearGradient>
<linearGradient
id="linearGradient25"
inkscape:collect="always">
<stop
style="stop-color:#8400ff;stop-opacity:1;"
offset="0"
id="stop25" />
<stop
style="stop-color:#a6ff00;stop-opacity:1;"
offset="1"
id="stop26" />
</linearGradient>
<linearGradient
id="linearGradient22"
inkscape:collect="always">
<stop
style="stop-color:#a6ff00;stop-opacity:1;"
offset="0"
id="stop22" />
<stop
style="stop-color:#a6ff00;stop-opacity:0;"
offset="1"
id="stop23" />
</linearGradient>
<linearGradient
id="linearGradient20"
inkscape:collect="always">
<stop
style="stop-color:#a6ff00;stop-opacity:1;"
offset="0"
id="stop20" />
<stop
style="stop-color:#8400ff;stop-opacity:1;"
offset="1"
id="stop21" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-48.006114 : 134.82698 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="319.48567 : 95.875675 : 1"
inkscape:persp3d-origin="135.46667 : 90.31111 : 1"
id="perspective4" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient20"
id="radialGradient21"
cx="-98.584175"
cy="-194.63264"
fx="-98.584175"
fy="-194.63264"
r="61.197166"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.97278099,0,0,0.97278071,3.5612796,1.7453146)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient22"
id="radialGradient23"
cx="-98.584175"
cy="-194.63264"
fx="-98.584175"
fy="-194.63264"
r="61.196966"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.97278099,0,0,0.97278071,3.5612796,1.7453146)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient25"
id="radialGradient26"
cx="92.561035"
cy="180.03487"
fx="92.561035"
fy="180.03487"
r="25.544106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0357901,0,0,1.0357902,-3.2696462,-5.5292128)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient26"
id="radialGradient28"
cx="92.561035"
cy="180.03487"
fx="92.561035"
fy="180.03487"
r="25.544106"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0357901,0,0,1.0357902,-3.2696462,-5.5292128)" />
</defs>
<g
inkscape:label="OS"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
inkscape:highlight-color="#a6ff00">
<circle
style="display:inline;fill:#a6ff00;fill-opacity:1;stroke:#000000;stroke-width:4.909;stroke-dasharray:none;stroke-opacity:1"
id="path2"
cx="-135.46666"
cy="-135.46666"
r="133.01196"
transform="scale(-1)"
inkscape:label="path2" />
<ellipse
style="fill:url(#radialGradient28);stroke:url(#radialGradient26);stroke-width:5.07123;stroke-dasharray:none;stroke-opacity:1"
id="path20"
cy="180.94914"
cx="92.604164"
rx="23.922718"
ry="23.92272" />
</g>
<g
inkscape:label="CS"
inkscape:groupmode="layer"
id="g2"
transform="rotate(180,135.46666,135.46666)"
inkscape:highlight-color="#8400ff">
<path
style="fill:#8400ff;fill-opacity:1;stroke:#000000;stroke-width:4.909;stroke-dasharray:none;stroke-opacity:1"
id="circle2"
sodipodi:type="arc"
sodipodi:cx="135.46666"
sodipodi:cy="135.46666"
sodipodi:rx="133.01196"
sodipodi:ry="133.01196"
sodipodi:start="0.78539816"
sodipodi:end="3.9269908"
sodipodi:arc-type="slice"
d="m 229.52032,229.52032 a 133.01196,133.01196 0 0 1 -188.10732,0 133.01196,133.01196 0 0 1 -3e-6,-188.10732 l 94.053663,94.05366 z" />
<ellipse
style="display:inline;fill:url(#radialGradient23);stroke:url(#radialGradient21);stroke-width:11.4098;stroke-dasharray:none;stroke-opacity:1"
id="path20-5"
transform="scale(-1)"
cy="-187.58957"
cx="-92.339546"
inkscape:label="path20-5"
rx="53.826378"
ry="53.826355" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -2,27 +2,26 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bxmfgknljdw65"
path.s3tc="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex"
uid="uid://dll54u8nmui3b"
path="res://.godot/imported/logo.png-cca8726399059c8d4f806e28e356b14d.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex"]
source_file="res://logo.png"
dest_files=["res://.godot/imported/logo.png-cca8726399059c8d4f806e28e356b14d.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -32,7 +31,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
detect_3d/compress_to=1

2
models/ak-12.mtl Normal file
View File

@ -0,0 +1,2 @@
# Made in Blockbench 4.9.4
newmtl none

1060
models/ak-12.obj Normal file

File diff suppressed because it is too large Load Diff

22
models/ak-12.obj.import Normal file
View File

@ -0,0 +1,22 @@
[remap]
importer="wavefront_obj"
importer_version=1
type="Mesh"
uid="uid://ci000murhycl2"
path="res://.godot/imported/ak-12.obj-ad26db8e05ecd6bd3f277bc08c0cf9fc.mesh"
[deps]
files=["res://.godot/imported/ak-12.obj-ad26db8e05ecd6bd3f277bc08c0cf9fc.mesh"]
source_file="res://models/ak-12.obj"
dest_files=["res://.godot/imported/ak-12.obj-ad26db8e05ecd6bd3f277bc08c0cf9fc.mesh", "res://.godot/imported/ak-12.obj-ad26db8e05ecd6bd3f277bc08c0cf9fc.mesh"]
[params]
generate_tangents=true
scale_mesh=Vector3(1, 1, 1)
offset_mesh=Vector3(0, 0, 0)
optimize_mesh=true
force_disable_mesh_compression=false

2
models/pistoletda.mtl Normal file
View File

@ -0,0 +1,2 @@
# Made in Blockbench 4.9.4
newmtl none

709
models/pistoletda.obj Normal file
View File

@ -0,0 +1,709 @@
# Made in Blockbench 4.9.4
mtllib pistoletda.mtl
o cuboid
v -0.029506699999999986 -0.5437500000000002 0.31834890625
v -0.029506699999999986 -0.5437500000000002 0.46915109374999975
v -0.06874999999999995 0.41875 0.36250000000000004
v -0.07499999999999996 0.41875 -0.4687500000000002
v -0.07499999999999983 0.2694533824900248 -0.46750108536654167
v -0.07499999999999983 0.2367966175099752 0.05500108536654147
v -0.07499999999999996 0.41875 0.05625000000000002
v -0.04889999999999998 0.21875 0.06578125000000001
v -0.04889999999999998 0.10624999999999998 0.09078125000000004
v -0.04889999999999998 0.031249999999999972 0.35296875000000005
v -0.04889999999999998 -0.08750000000000005 0.1720312500000001
v -0.04889999999999998 -0.08750000000000005 0.4029687499999999
v -0.04889999999999998 -0.15000000000000005 0.18453125000000012
v -0.04889999999999998 -0.15000000000000005 0.41546874999999983
v -0.029506699999999986 -0.15000000000000005 0.22459890625000006
v -0.029506699999999986 -0.15000000000000005 0.37540109374999986
v -0.029506699999999986 -0.51875 0.31834890625
v -0.029506699999999986 -0.51875 0.46915109374999975
v -0.06874999999999995 0.2812499999999999 0.36875
v -0.04889999999999998 0.21875 0.29671875000000014
v -0.029506699999999986 -0.5437500000000002 0.30584890625
v -0.029506699999999986 -0.51875 0.30584890625
v -0.029506699999999986 -0.5437500000000002 0.48165109374999976
v -0.029506699999999986 -0.51875 0.48165109374999976
v -0.04062499999999998 0.40456133288136675 -0.4686845652337528
v -0.04374999999999991 0.32618399864410047 -0.46855369570125793
v -0.04062499999999998 0.40454046119835163 -0.48118454780865455
v -0.04374999999999991 0.32616312696108535 -0.4810536782761597
v -0.02085 0.41875 0.3394437499999998
v -0.022587500000000003 0.41875 0.25430625000000007
v -0.010425 0.4375 0.3181593749999999
v -0.011293750000000002 0.4375 0.275590625
v -0.08749999999999983 0.24449239740090764 -0.10652031883006599
v -0.07499999999999996 0.41875 -0.1500027071457303
v -0.04889999999999998 0.20844521716112602 0.04594744793991074
v -0.010469657779394929 0.21909128859118487 0.038845172507859946
v -0.04889999999999998 0.15519184638633401 0.048519558738502985
v -0.008798571694057046 0.22368255987661545 -0.012907807314820708
v -0.02445000000000001 0.12784985517052427 0.01036821060770544
v -0.02445000000000001 0.10859199121580962 0.01643259813079758
v -0.02445000000000001 0.1286268638217558 -0.10102251730650574
v -0.02445000000000001 0.10936899986704116 -0.09495812978341361
v -0.02445000000000006 0.1286019559145472 -0.17331526980367568
v -0.02445000000000006 0.1093484475032565 -0.17939347134565264
v -0.016474818337346025 0.13846975038340695 -0.02475043988131545
v -0.01628373642090237 0.1372633066440338 -0.01181219492564528
v -0.02472500000000003 0.17235818289134938 -0.1614920816793832
v -0.024725000000000004 0.1723706368449537 -0.12534570543079823
v -0.011253538090342498 0.16976009700783365 -0.006219562359150502
v -0.011719677677956519 0.16736201672037104 0.019656927552189805
v 0.029506699999999986 -0.5437500000000002 0.31834890625
v 0.029506699999999986 -0.5437500000000002 0.46915109374999975
v 0.06874999999999995 0.41875 0.36250000000000004
v 0.07499999999999996 0.41875 -0.4687500000000002
v 0.07499999999999983 0.2694533824900248 -0.46750108536654167
v 0.07499999999999983 0.2367966175099752 0.05500108536654147
v 0.07499999999999996 0.41875 0.05625000000000002
v 0.04889999999999998 0.21875 0.06578125000000001
v 0.04889999999999998 0.10624999999999998 0.09078125000000004
v 0.04889999999999998 0.031249999999999972 0.35296875000000005
v 0.04889999999999998 -0.08750000000000005 0.1720312500000001
v 0.04889999999999998 -0.08750000000000005 0.4029687499999999
v 0.04889999999999998 -0.15000000000000005 0.18453125000000012
v 0.04889999999999998 -0.15000000000000005 0.41546874999999983
v 0.029506699999999986 -0.15000000000000005 0.22459890625000006
v 0.029506699999999986 -0.15000000000000005 0.37540109374999986
v 0.029506699999999986 -0.51875 0.31834890625
v 0.029506699999999986 -0.51875 0.46915109374999975
v 0.06874999999999995 0.2812499999999999 0.36875
v 0.04889999999999998 0.21875 0.29671875000000014
v 0.029506699999999986 -0.5437500000000002 0.30584890625
v 0.029506699999999986 -0.51875 0.30584890625
v 0.029506699999999986 -0.5437500000000002 0.48165109374999976
v 0.029506699999999986 -0.51875 0.48165109374999976
v 0.04062499999999998 0.40456133288136675 -0.4686845652337528
v 0.04374999999999991 0.32618399864410047 -0.46855369570125793
v 0.04062499999999998 0.40454046119835163 -0.48118454780865455
v 0.04374999999999991 0.32616312696108535 -0.4810536782761597
v 0.02085 0.41875 0.3394437499999998
v 0.022587500000000003 0.41875 0.25430625000000007
v 0.010425 0.4375 0.3181593749999999
v 0.011293750000000002 0.4375 0.275590625
v 0.08749999999999983 0.24449239740090764 -0.10652031883006599
v 0.07499999999999996 0.41875 -0.1500027071457303
v 0.04889999999999998 0.20844521716112602 0.04594744793991074
v 0.010469657779394929 0.21909128859118487 0.038845172507859946
v 0.04889999999999998 0.15519184638633401 0.048519558738502985
v 0.008798571694057046 0.22368255987661545 -0.012907807314820708
v 0.02445000000000001 0.12784985517052427 0.01036821060770544
v 0.02445000000000001 0.10859199121580962 0.01643259813079758
v 0.02445000000000001 0.1286268638217558 -0.10102251730650574
v 0.02445000000000001 0.10936899986704116 -0.09495812978341361
v 0.02445000000000006 0.1286019559145472 -0.17331526980367568
v 0.02445000000000006 0.1093484475032565 -0.17939347134565264
v 0.016474818337346025 0.13846975038340695 -0.02475043988131545
v 0.01628373642090237 0.1372633066440338 -0.01181219492564528
v 0.02472500000000003 0.17235818289134938 -0.1614920816793832
v 0.024725000000000004 0.1723706368449537 -0.12534570543079823
v 0.011253538090342498 0.16976009700783365 -0.006219562359150502
v 0.011719677677956519 0.16736201672037104 0.019656927552189805
vt 0.282121875 0.5504
vt 0.282121875 0.475
vt 0.311628125 0.475
vt 0.311628125 0.5504
vt 0.2390625 0.25
vt 0.1984375 0.25
vt 0.196875 0.21875
vt 0.240625 0.21875
vt 0.8333375 0.5
vt 0.833771875 0.53125
vt 0.822478125 0.53125
vt 0.8229125 0.5
vt 0.46875 0.25
vt 0.46875 0.3125
vt 0.40625 0.3125
vt 0.40625 0.25
vt 0.084375 0.30000000000000004
vt 0.084375 0.40312499999999996
vt 0.009375000000000001 0.40312499999999996
vt 0.009375000000000001 0.30000000000000004
vt 0.72555 0.5579093749999999
vt 0.77445 0.5579093749999999
vt 0.755234375 0.564309375
vt 0.744765625 0.564309375
vt 0.647425 0.25
vt 0.696325 0.25
vt 0.70625 0.3125
vt 0.6375 0.3125
vt 0.72555 0.53125
vt 0.77445 0.53125
vt 0.77445 0.5579093749999999
vt 0.72555 0.5579093749999999
vt 0.6318 0.46462187499999996
vt 0.6807 0.46462187499999996
vt 0.6807 0.5625
vt 0.6318 0.5625
vt 0.35055000000000003 0.75061875
vt 0.39944999999999997 0.75061875
vt 0.39944999999999997 0.855665625
vt 0.35055000000000003 0.855665625
vt 0.6318 0.400196875
vt 0.6807 0.400196875
vt 0.6807 0.46462187499999996
vt 0.6318 0.46462187499999996
vt 0.35055000000000003 0.71875
vt 0.39944999999999997 0.71875
vt 0.39944999999999997 0.75061875
vt 0.35055000000000003 0.75061875
vt 0.6318 0.368328125
vt 0.6807 0.368328125
vt 0.6807 0.400196875
vt 0.6318 0.400196875
vt 0.577253125 0.770034375
vt 0.547746875 0.770034375
vt 0.53805 0.75
vt 0.58695 0.75
vt 0.547746875 0.845434375
vt 0.577253125 0.845434375
vt 0.58695 0.86546875
vt 0.53805 0.86546875
vt 0.6875 0.6875
vt 0.71875 0.6875
vt 0.71875 0.875
vt 0.6875 0.875
vt 0.125 0.125
vt 0.15625 0.125
vt 0.15625 0.3125
vt 0.125 0.3125
vt 0.625 0.75
vt 0.65625 0.75
vt 0.65625 0.78125
vt 0.625 0.78125
vt 0.75 0.6875
vt 0.78125 0.6875
vt 0.78125 0.71875
vt 0.75 0.71875
vt 0.282121875 0.46875
vt 0.311628125 0.46875
vt 0.311628125 0.475
vt 0.282121875 0.475
vt 0.53125 0.25
vt 0.5 0.25
vt 0.5 0.21875
vt 0.53125 0.21875
vt 0.311628125 0.55665
vt 0.282121875 0.55665
vt 0.282121875 0.5504
vt 0.311628125 0.5504
vt 0.5625 0.21875
vt 0.59375 0.21875
vt 0.59375 0.25
vt 0.5625 0.25
vt 0.02656194936110779 0.8800568432860625
vt 0.06718694887092802 0.8800505324140259
vt 0.08437555063889221 0.8871416123441097
vt 0.00937555154383947 0.8871532631847927
vt 0.06874944932956746 0.8408710045443022
vt 0.024999449361107793 0.8408693432860626
vt 0.0093755265796793 0.8125
vt 0.08437552652561016 0.8125028478712679
vt 0.4375 0.1875
vt 0.46875 0.1875
vt 0.46875 0.21875
vt 0.4375 0.21875
vt 0.375 0.1875
vt 0.40625 0.1875
vt 0.40625 0.21875
vt 0.375 0.21875
vt 0.03558125 0.20097187500000002
vt 0.05816875 0.20097187500000002
vt 0.084375 0.30000000000000004
vt 0.009375000000000001 0.30000000000000004
vt 0.057300000000000004 0.15840312499999998
vt 0.03645 0.15840312499999998
vt 0.012499999999999997 0.14687499999999998
vt 0.08124999999999999 0.14687499999999998
vt 0.271271875 0.1875
vt 0.259978125 0.1875
vt 0.25433125 0.15625
vt 0.27691875 0.15625
vt 0.8333375 0.71875
vt 0.8229125 0.71875
vt 0.8177 0.6875
vt 0.83855 0.6875
vt 0.5093749166282874 0.5431354865986693
vt 0.5031249166282873 0.36221361159866927
vt 0.5906249166282873 0.36221361159866927
vt 0.5843749166282873 0.5431354865986693
vt 0.009375000000000001 0.5625
vt 0.009375000000000001 0.40312499999999996
vt 0.084375 0.40312499999999996
vt 0.084375 0.5625
vt 0.77785 0.19608749999999997
vt 0.7534 0.19608749999999997
vt 0.7534 0.18599062499999997
vt 0.77785 0.18599062499999997
vt 0.336265625 0.15625
vt 0.3363625 0.1875
vt 0.3198875 0.1875
vt 0.319984375 0.15625
vt 0.5512749166282873 0.3142636115986692
vt 0.5906249166282873 0.36221361159866927
vt 0.5031249166282873 0.36221361159866927
vt 0.5424749166282873 0.3142636115986692
vt 0.737775 0.46875
vt 0.762225 0.46875
vt 0.77445 0.5
vt 0.72555 0.5
vt 0.456525 0.816665625
vt 0.48097500000000004 0.816665625
vt 0.49319999999999997 0.8538593750000001
vt 0.44430000000000003 0.853859375
vt 0.65625 0.875
vt 0.625 0.875
vt 0.625 0.8125
vt 0.65625 0.8125
vt 0.456525 0.76096875
vt 0.48097500000000004 0.76096875
vt 0.48097500000000004 0.816665625
vt 0.456525 0.816665625
vt 0.75 0.25
vt 0.78125 0.25
vt 0.78125 0.28125
vt 0.75 0.28125
vt 0.456525 0.71875
vt 0.48097500000000004 0.71875
vt 0.48097500000000004 0.76096875
vt 0.456525 0.76096875
vt 0.572496875 0.15625
vt 0.583753125 0.15625
vt 0.582525 0.1875
vt 0.573725 0.1875
vt 0.822265625 0.959275
vt 0.833984375 0.959275
vt 0.833359375 0.9868625
vt 0.822890625 0.9868625
vt 0.8198875 0.5625
vt 0.8363625 0.5625
vt 0.833753125 0.59375
vt 0.822496875 0.59375
vt 0.819984375 0.9375
vt 0.836265625 0.9375
vt 0.833984375 0.959275
vt 0.822265625 0.959275
vt 0.7779875 0.21875
vt 0.7532625 0.21875
vt 0.7534 0.19608749999999997
vt 0.77785 0.19608749999999997
vt 0.2154875 0.1875
vt 0.1907625 0.1875
vt 0.19090000000000001 0.15625
vt 0.21534999999999999 0.15625
vt 0.1857375 0.37812500000000004
vt 0.1857375 0.3656250000000001
vt 0.2611375 0.3656250000000001
vt 0.2611375 0.37812500000000004
vt 0.14350967903105108 0.94375
vt 0.18413467903105107 0.846875
vt 0.2996034290310511 0.846875
vt 0.27460342903105106 0.90625
vt 0.18413467903105107 0.846875
vt 0.19038467903105108 0.815625
vt 0.30585342903105106 0.815625
vt 0.2996034290310511 0.846875
vt 0.53805 0.75
vt 0.547746875 0.770034375
vt 0.547746875 0.845434375
vt 0.53805 0.86546875
vt 0.1388625 0.5625
vt 0.1857375 0.37812500000000004
vt 0.2611375 0.37812500000000004
vt 0.21426250000000002 0.5625
vt 0.2054705829083111 0.30031454930939216
vt 0.2108612079083111 0.28444892430939217
vt 0.3263299579083111 0.28444892430939217
vt 0.3623455829083111 0.3103864243093921
vt 0.13100967903105107 1
vt 0.14350967903105108 0.94375
vt 0.27460342903105106 0.90625
vt 0.24647842903105105 1
vt 0.3876515972471376 0.6851098970706792
vt 0.4088105251353884 0.597616038942963
vt 0.48981363038017356 0.59375
vt 0.4904359683173213 0.684340621820905
vt 0.49043863038017355 0.684728125
vt 0.48981363038017356 0.59375
vt 0.6467198803801736 0.615978125
vt 0.6435948803801735 0.684728125
vt 0.1857375 0.37812500000000004
vt 0.17948750000000002 0.37812500000000004
vt 0.17948750000000002 0.3656250000000001
vt 0.1857375 0.3656250000000001
vt 0.2611375 0.3656250000000001
vt 0.2673875 0.3656250000000001
vt 0.2673875 0.37812500000000004
vt 0.2611375 0.37812500000000004
vt 0.0843709342993999 0.88715656602386
vt 0.06718397330860035 0.8800583857699948
vt 0.06874944932956746 0.8408710045443022
vt 0.0843734784618089 0.8125065660018046
vt 0.71875 0.21875
vt 0.6875 0.21875
vt 0.6875 0.1875
vt 0.71875 0.1875
vt 0.012499999999999997 0.14687499999999998
vt 0.03645 0.15840312499999998
vt 0.03558125 0.20097187500000002
vt 0.009375000000000001 0.30000000000000004
vt 0.8025390625 0.75
vt 0.7920046875 0.78125
vt 0.7707140625 0.78125
vt 0.7599609375 0.75
vt 0.4088109792112786 0.5976141613028612
vt 0.3876515972471376 0.6851098970706792
vt 0.22828011961982642 0.6861694931670557
vt 0.2284100666656519 0.6117076085269533
vt 0.13100967903105107 1
vt 0.12109405403105107 0.994846875
vt 0.12237842903105108 0.968221875
vt 0.14350967903105108 0.94375
vt 0.5523710526955196 0.28829500329210744
vt 0.5906249166282873 0.36221361159866927
vt 0.5512765832594778 0.3142656424745418
vt 0.12237842903105108 0.968221875
vt 0.10100584864927373 0.9526195425292573
vt 0.104474539127203 0.9431386106562386
vt 0.14312231471603176 0.9441986024772133
vt 0.10100584864927373 0.9526195425292573
vt 0.04534947496545675 0.9504608138795771
vt 0.04882076616625128 0.9409814489190148
vt 0.10447401811626256 0.9431400347294625
vt 0.04534947496545675 0.9504608138795771
vt 0.009244073125666732 0.9487962483807795
vt 0.006646570968948939 0.9390423256859621
vt 0.04882076616625128 0.9409814489190148
vt 0.7399985271819809 0.4375
vt 0.743357902181981 0.41051250000000006
vt 0.7562985271819809 0.40931249999999997
vt 0.765882902181981 0.43518750000000006
vt 0.743357902181981 0.41051250000000006
vt 0.734117097818019 0.39463395568785953
vt 0.7405894449574038 0.39406405485400864
vt 0.7562904589125373 0.40931324818050385
vt 0.04534947496545676 0.9504608138795771
vt 0.03220293409968965 0.9717571630656545
vt 0.014147111445988944 0.9709247374770231
vt 0.009244073125666732 0.9487962483807795
vt 0.5906250833717127 0.3622139337998975
vt 0.5523710526955196 0.28829500329210744
vt 0.5860590527145313 0.28125032220122825
vt 0.875 0.46875
vt 0.8405792598348666 0.46875
vt 0.8580567340196208 0.4585162068090871
vt 0.2001544170916889 0.28125
vt 0.2108612079083111 0.28444892430939217
vt 0.2054706973720894 0.30031421242092693
vt 0.3326125 0.3656250000000001
vt 0.4080125 0.3656250000000001
vt 0.4080125 0.37812500000000004
vt 0.3326125 0.37812500000000004
vt 0.012896831474419168 0.628125
vt 0.12836558147441918 0.628125
vt 0.16899058147441917 0.725
vt 0.03789683147441916 0.6875
vt 0.0066468314744191626 0.596875
vt 0.12211558147441916 0.596875
vt 0.12836558147441918 0.628125
vt 0.012896831474419168 0.628125
vt 0.577253125 0.845434375
vt 0.577253125 0.770034375
vt 0.58695 0.75
vt 0.58695 0.86546875
vt 0.3326125 0.37812500000000004
vt 0.4080125 0.37812500000000004
vt 0.4548875 0.5625
vt 0.3794875 0.5625
vt 0.7361700420916889 0.6281989243093922
vt 0.8516387920916889 0.6281989243093922
vt 0.8570294170916889 0.6440645493093922
vt 0.7001544170916889 0.6541364243093921
vt 0.03789683147441916 0.6875
vt 0.16899058147441917 0.725
vt 0.18149058147441915 0.78125
vt 0.06602183147441917 0.78125
vt 0.5101863696198264 0.90625
vt 0.5911894748646116 0.910116038942963
vt 0.6123484027528624 0.9976098970706792
vt 0.5095640316826787 0.996840621820905
vt 0.3532801196198264 0.928478125
vt 0.5101863696198264 0.90625
vt 0.5095613696198265 0.997228125
vt 0.3564051196198264 0.997228125
vt 0.78125 0.3125
vt 0.78125 0.34375
vt 0.75 0.34375
vt 0.75 0.3125
vt 0.3263625 0.37812500000000004
vt 0.3263625 0.3656250000000001
vt 0.3326125 0.3656250000000001
vt 0.3326125 0.37812500000000004
vt 0.024999449361107793 0.8408693432860626
vt 0.02656194936110779 0.8800568432860625
vt 0.00937444936110779 0.8871537182860625
vt 0.00937757436110779 0.8125037182860625
vt 0.625 0.1875
vt 0.65625 0.1875
vt 0.65625 0.21875
vt 0.625 0.21875
vt 0.05816875 0.20097187500000002
vt 0.0573 0.15840312499999998
vt 0.08124999999999999 0.14687499999999998
vt 0.084375 0.30000000000000004
vt 0.3230359375 0.25
vt 0.3017453125 0.25
vt 0.2912109375 0.21875
vt 0.3337890625 0.21875
vt 0.7717198803801736 0.9986694931670557
vt 0.6123484027528624 0.9976098970706792
vt 0.5911890207887214 0.910114161302861
vt 0.7715899333343481 0.9242076085269533
vt 0.19012183147441916 0.749471875
vt 0.19140620647441917 0.776096875
vt 0.18149058147441915 0.78125
vt 0.16899058147441917 0.725
vt 0.5031249166282873 0.36221361159866927
vt 0.541378780561055 0.28829500329210744
vt 0.5424732499970968 0.3142656424745418
vt 0.20802572137826722 0.7243886106562386
vt 0.21149441185619652 0.7338695425292574
vt 0.19012183147441916 0.749471875
vt 0.1693779457894385 0.7254486024772133
vt 0.2636789733282785 0.7222300248457909
vt 0.267150264529073 0.7317093898063531
vt 0.21149389084525605 0.7338681184560334
vt 0.20802572137826722 0.7243886106562386
vt 0.30585316852558087 0.7202909016127383
vt 0.30325566636886303 0.7300448243075556
vt 0.267150264529073 0.7317093898063532
vt 0.2636789733282785 0.7222300248457909
vt 0.7749555069527408 0.8468125
vt 0.7878961319527409 0.8480125000000001
vt 0.7912555069527408 0.875
vt 0.7653711319527409 0.8726875000000001
vt 0.7906565209078744 0.8315633066735049
vt 0.7971288680472591 0.8321332075073558
vt 0.7878880636832972 0.8480117518194962
vt 0.7749555069527408 0.8468125
vt 0.2983526280485408 0.7521733134037993
vt 0.28029680539484003 0.7530057389924307
vt 0.267150264529073 0.7317093898063532
vt 0.30325566636886303 0.7300448243075556
vt 0.5413789473044804 0.2882946810908792
vt 0.5031249166282873 0.36221361159866927
vt 0.5076909472854687 0.28125
vt 0.5102337931909129 0.1530792598348666
vt 0.5102337931909129 0.1875
vt 0.5 0.1705567340196208
vt 0.8516387920916889 0.6281989243093922
vt 0.8623455829083111 0.625
vt 0.8570293026279105 0.6440642124209269
vn 0 -1 0
vn 0 -0.001669734641210571 -0.9999986059921424
vn 0 1 0
vn 0 0.045407660918649784 0.9989685402102997
vn 0 1 0
vn 0 -0.5549649411032079 -0.8318737369014082
vn 0 -0.7553105403859344 0.6553670632415914
vn 0 -0.04824325366519564 -0.9988356163432478
vn 0 0.28734788556634494 0.9578262852211515
vn 0 -0.38672667625067453 -0.9221943818285308
vn 0 0.3880570000581315 0.9216353751380658
vn 0 -0.19611613513818418 -0.9805806756909201
vn 0 0.19611613513818338 0.9805806756909203
vn 0 -1 0
vn 0 -1 0
vn 0 -0.24639877909159877 -0.9691685310936224
vn 0 0.2463987790915986 0.9691685310936224
vn 0 0 -1
vn 0 0 1
vn 0 -1 0
vn 0 1 0
vn 0 -1 0
vn 0 1 0
vn 0 -0.0046117136913912385 -0.9999893659918733
vn 0 -0.018551344252963564 -0.999827909005549
vn 0 0.9999986059921425 -0.001669734641209789
vn 0 -0.9999986059921424 0.0016697346412097886
vn 0 1 0
vn 0 1 0
vn 0 0.7503681023408861 -0.6610202046755738
vn 0 0.7503681023408861 0.6610202046755739
vn 0 -0.9976178378468323 -0.06898296608447115
vn 0 1 0
vn 0 0.3010478781501444 -0.9536090263107287
vn 0 -0.9956807082909853 -0.09284356271256418
vn 0 -0.97617147371828 -0.2170005850192155
vn 0 0.8128151935674142 -0.5825216400323401
vn 0 -0.9995042402321033 -0.03148450028261663
vn 0 0.9999756719230746 0.006975353897531805
vn 0 -0.9999756719230746 -0.006975353897531803
vn 0 0.9999999406453262 -0.00034454222408026805
vn 0 -0.9999999703759104 0.00024340948701756062
vn 0 -0.123091247835108 -0.9923953570560455
vn 0 -0.34778059498693337 0.9375759477239883
vn 0 0.5095673090247187 -0.8604307976666729
vn 0 -0.7226669741644133 0.6911963863129287
vn 0 0.2608510603957077 -0.965379057308804
vn 0 0.48596491711196277 0.8739783174291932
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn 0 -1 0
vn -1 0 0
vn -0.5687281344121056 -0.8225255674616602 0
vn -1 0 0
vn -0.992496576136477 0.09144782105381558 0.08116552458944547
vn -0.9998012525008254 -0.00013683797693984372 0.019935816340162994
vn -1 0 0
vn -1 0 0
vn 0.001194690135021918 -0.001717367069094012 -0.9999978116805214
vn -0.9992060915293383 0.03983945563841803 -0.00006652141189777811
vn 0 1 0
vn -0.8652090788081117 0.5011002581430316 0.017657328138941122
vn -0.9974370834279243 0.07154903635127748 0
vn -1 0 0
vn -0.15061017944503302 -0.9842858583396298 -0.09218417933763436
vn -0.8768894300418022 -0.1443824592922636 -0.45849605552248895
vn -1 0 0
vn -1 -2.1213190136722787e-16 6.719558933790427e-16
vn -0.9989452182060938 0.0437505916083406 -0.013940471910941409
vn -0.9885596717686322 0.14813004931600485 0.028412388888161257
vn -0.9999802474254373 -0.006285280763139086 0.000002165544742403895
vn -0.27031267778105567 -0.9624495790747458 -0.024937200518104684
vn -0.21133651274958745 0.11538700871428621 -0.9705785473617337
vn -0.6265919925615746 -0.6915756395740456 0.3593126905711313
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 0 -1 0
vn 1 0 0
vn 0.5687281344121056 -0.8225255674616601 0
vn 1 0 0
vn 0.992496576136477 0.09144782105381556 0.08116552458944547
vn 0.9998012525008254 -0.0001368379769398451 0.019935816340162994
vn 1 0 0
vn 1 0 0
vn -0.001194690135021918 -0.0017173670690940116 -0.9999978116805214
vn 0.9992060915293383 0.03983945563841803 -0.0000665214118977465
vn 0 1 0
vn 0.8652090788081117 0.5011002581430316 0.017657328138941112
vn 0.9974370834279243 0.07154903635127748 0
vn 1 0 0
vn 0.15061017944503302 -0.98428585833963 -0.09218417933763448
vn 0.8768894300418022 -0.14438245929226376 -0.45849605552248884
vn 1 0 0
vn 1 -2.1213190136722763e-16 6.719558933790428e-16
vn 0.9989452182060938 0.043750591608340605 -0.013940471910941402
vn 0.9885596717686322 0.14813004931600482 0.028412388888161264
vn 0.9999802474254373 -0.006285280763139084 0.000002165544742403917
vn 0.2703126777810558 -0.9624495790747458 -0.02493720051810468
vn 0.21133651274958745 0.11538700871428618 -0.9705785473617337
vn 0.6265919925615746 -0.6915756395740457 0.35931269057113135
usemtl none
f 2/1/1 1/2/1 51/3/1 52/4/1
f 27/5/2 77/6/2 78/7/2 28/8/2
f 81/9/3 82/10/3 32/11/3 31/12/3
f 69/13/4 53/14/4 3/15/4 19/16/4
f 57/17/5 84/18/5 34/19/5 7/20/5
f 85/21/6 35/22/6 36/23/6 86/24/6
f 20/25/7 70/26/7 69/27/7 19/28/7
f 87/29/8 37/30/8 35/31/8 85/32/8
f 10/33/9 60/34/9 70/35/9 20/36/9
f 61/37/10 11/38/10 9/39/10 59/40/10
f 12/41/11 62/42/11 60/43/11 10/44/11
f 63/45/12 13/46/12 11/47/12 61/48/12
f 14/49/13 64/50/13 62/51/13 12/52/13
f 65/53/14 15/54/14 13/55/14 63/56/14
f 16/57/15 66/58/15 64/59/15 14/60/15
f 67/61/16 17/62/16 15/63/16 65/64/16
f 18/65/17 68/66/17 66/67/17 16/68/17
f 71/69/18 21/70/18 22/71/18 72/72/18
f 23/73/19 73/74/19 74/75/19 24/76/19
f 21/77/20 71/78/20 51/79/20 1/80/20
f 72/81/21 22/82/21 17/83/21 67/84/21
f 73/85/22 23/86/22 2/87/22 52/88/22
f 24/89/23 74/90/23 68/91/23 18/92/23
f 75/93/24 25/94/24 4/95/24 54/96/24
f 26/97/25 76/98/25 55/99/25 5/100/25
f 77/101/26 27/102/26 25/103/26 75/104/26
f 28/105/27 78/106/27 76/107/27 26/108/27
f 30/109/28 80/110/28 57/111/28 7/112/28
f 79/113/29 29/114/29 3/115/29 53/116/29
f 32/117/30 82/118/30 80/119/30 30/120/30
f 81/121/31 31/122/31 29/123/31 79/124/31
f 55/125/32 83/126/32 33/127/32 5/128/32
f 4/129/33 34/130/33 84/131/33 54/132/33
f 43/133/34 93/134/34 94/135/34 44/136/34
f 46/137/35 45/138/35 95/139/35 96/140/35
f 38/141/36 33/142/36 83/143/36 88/144/36
f 89/145/37 39/146/37 37/147/37 87/148/37
f 40/149/38 90/150/38 59/151/38 9/152/38
f 91/153/39 41/154/39 39/155/39 89/156/39
f 42/157/40 92/158/40 90/159/40 40/160/40
f 97/161/41 47/162/41 48/163/41 98/164/41
f 44/165/42 94/166/42 92/167/42 42/168/42
f 99/169/43 49/170/43 38/171/43 88/172/43
f 50/173/44 100/174/44 86/175/44 36/176/44
f 95/177/45 45/178/45 49/179/45 99/180/45
f 46/181/46 96/182/46 100/183/46 50/184/46
f 47/185/47 97/186/47 93/187/47 43/188/47
f 98/189/48 48/190/48 41/191/48 91/192/48
f 17/193/49 1/194/49 2/195/49 18/196/49
f 9/197/50 11/198/50 12/199/50 10/200/50
f 11/201/51 13/202/51 14/203/51 12/204/51
f 13/205/52 15/206/52 16/207/52 14/208/52
f 15/209/53 17/210/53 18/211/53 16/212/53
f 6/213/54 8/214/54 20/215/54 19/216/54
f 8/217/55 9/218/55 10/219/55 20/220/55
f 34/221/56 33/222/56 6/223/56 7/224/56
f 7/225/57 6/226/57 19/227/57 3/228/57
f 17/229/58 22/230/58 21/231/58 1/232/58
f 2/233/59 23/234/59 24/235/59 18/236/59
f 4/237/60 25/238/60 26/239/60 5/240/60
f 25/241/61 27/242/61 28/243/61 26/244/61
f 3/245/62 29/246/62 30/247/62 7/248/62
f 29/249/63 31/250/63 32/251/63 30/252/63
f 33/253/64 34/254/64 4/255/64 5/256/64
f 8/257/65 35/258/65 37/259/65 9/260/65
f 36/261/66 33/262/66 38/263/66
f 37/264/67 39/265/67 40/266/67 9/267/67
f 39/268/68 41/269/68 42/270/68 40/271/68
f 41/272/69 43/273/69 44/274/69 42/275/69
f 38/276/70 49/277/70 50/278/70 36/279/70
f 49/280/71 45/281/71 46/282/71 50/283/71
f 41/284/72 48/285/72 47/286/72 43/287/72
f 33/288/73 36/289/73 6/290/73
f 6/291/74 36/292/74 35/293/74
f 35/294/75 8/295/75 6/296/75
f 52/297/76 51/298/76 67/299/76 68/300/76
f 62/301/77 61/302/77 59/303/77 60/304/77
f 64/305/78 63/306/78 61/307/78 62/308/78
f 66/309/79 65/310/79 63/311/79 64/312/79
f 68/313/80 67/314/80 65/315/80 66/316/80
f 70/317/81 58/318/81 56/319/81 69/320/81
f 60/321/82 59/322/82 58/323/82 70/324/82
f 56/325/83 83/326/83 84/327/83 57/328/83
f 69/329/84 56/330/84 57/331/84 53/332/84
f 71/333/85 72/334/85 67/335/85 51/336/85
f 74/337/86 73/338/86 52/339/86 68/340/86
f 76/341/87 75/342/87 54/343/87 55/344/87
f 78/345/88 77/346/88 75/347/88 76/348/88
f 80/349/89 79/350/89 53/351/89 57/352/89
f 82/353/90 81/354/90 79/355/90 80/356/90
f 54/357/91 84/358/91 83/359/91 55/360/91
f 87/361/92 85/362/92 58/363/92 59/364/92
f 83/365/93 86/366/93 88/367/93
f 90/368/94 89/369/94 87/370/94 59/371/94
f 92/372/95 91/373/95 89/374/95 90/375/95
f 94/376/96 93/377/96 91/378/96 92/379/96
f 100/380/97 99/381/97 88/382/97 86/383/97
f 96/384/98 95/385/98 99/386/98 100/387/98
f 97/388/99 98/389/99 91/390/99 93/391/99
f 86/392/100 83/393/100 56/394/100
f 86/395/101 56/396/101 85/397/101
f 58/398/102 85/399/102 56/400/102

View File

@ -0,0 +1,22 @@
[remap]
importer="wavefront_obj"
importer_version=1
type="Mesh"
uid="uid://mn81pev3xigk"
path="res://.godot/imported/pistoletda.obj-b2dc735ee9be3082be13821c5c2e5d32.mesh"
[deps]
files=["res://.godot/imported/pistoletda.obj-b2dc735ee9be3082be13821c5c2e5d32.mesh"]
source_file="res://models/pistoletda.obj"
dest_files=["res://.godot/imported/pistoletda.obj-b2dc735ee9be3082be13821c5c2e5d32.mesh", "res://.godot/imported/pistoletda.obj-b2dc735ee9be3082be13821c5c2e5d32.mesh"]
[params]
generate_tangents=true
scale_mesh=Vector3(1, 1, 1)
offset_mesh=Vector3(0, 0, 0)
optimize_mesh=true
force_disable_mesh_compression=false

View File

@ -14,7 +14,7 @@ config/name="Cs-os"
run/main_scene="res://scenes/HUD/menu.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
boot_splash/bg_color=Color(0.282353, 0.00784314, 0.0745098, 1)
config/icon="res://icon.svg"
config/icon="res://logo.png"
[autoload]

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://cm4as5vv2k2di"]
[ext_resource type="Script" path="res://scripts/BulletTraces.gd" id="1_trgm5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g4lay"]
albedo_color = Color(1, 0, 1, 1)
emission = Color(1, 0, 0.741176, 1)
emission_energy_multiplier = 9.21
[sub_resource type="ImmediateMesh" id="ImmediateMesh_djmsg"]
[node name="MeshInstance3D" type="MeshInstance3D"]
material_override = SubResource("StandardMaterial3D_g4lay")
mesh = SubResource("ImmediateMesh_djmsg")
script = ExtResource("1_trgm5")

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://dvrv2bfmotivm"]
[ext_resource type="Texture2D" uid="uid://bmuo2tbe3r8ih" path="res://textures/logo/ammo.svg" id="1_p3k0o"]
[ext_resource type="Script" path="res://scripts/kill_log_entry.gd" id="1_tki6n"]
[ext_resource type="Script" path="res://scripts/KillLogEntry.gd" id="1_tki6n"]
[node name="kill_log_entry" type="HBoxContainer"]
offset_right = 311.0

View File

@ -57,7 +57,7 @@ mesh = ExtResource("2_7hcoq")
surface_material_override/0 = SubResource("StandardMaterial3D_0suq1")
[node name="raycast" type="RayCast3D" parent="Head/Camera/Hand/knife"]
transform = Transform3D(1, -2.38419e-07, -1.49012e-08, -5.96046e-08, 1, 0, 0, -1.11759e-08, 1, -0.04988, 2.15182, 0.0228496)
transform = Transform3D(-0.499475, -0.84915, -0.171667, 0.861274, -0.508089, 0.00733016, -0.0934463, -0.144191, 0.985128, -0.04988, 2.15182, 0.02285)
[node name="pistol" parent="Head/Camera/Hand" instance=ExtResource("2_nxbij")]
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 2.38419e-07, -0.0344509, 0.118615)

11
scripts/BulletTraces.gd Normal file
View File

@ -0,0 +1,11 @@
extends MeshInstance3D
func init(start, end):
var draw_mesh = ImmediateMesh.new()
mesh = draw_mesh
draw_mesh.surface_begin(Mesh.PRIMITIVE_LINES, material_override)
draw_mesh.surface_add_vertex(to_local(start))
draw_mesh.surface_add_vertex(to_local(end))
draw_mesh.surface_end()
await get_tree().create_timer(1).timeout
free()

View File

@ -1,5 +1,6 @@
extends Node
var Weapons = {
"knife" = {
"number": 0,
@ -18,9 +19,30 @@ var Weapons = {
}
}
var properties_example = {
HP = 100,
AP = 100,
HACK = 1.0,
class_type = 0,
is_playable = false,
internal_id = 0,
nickname = "Unnamed",
ready = false,
current_weapon = Weapons["knife"].duplicate(),
weapons = Weapons.duplicate(),
last_shot = 0,
reloading = false,
position = Vector3(0, 5, 0)
}
var client_settings
var server_settings
func apply_weapon_settings(s: Dictionary): #game/weapons/weapon
for weapon in s.values():
Weapons[s.find_key(weapon)] = weapon
print("New weapons: " + str(Weapons))
func _ready():
read_settings()
@ -49,6 +71,7 @@ func read_settings():
else:
server_settings_file = FileAccess.open("./settings/server-settings.json", FileAccess.READ)
server_settings = JSON.parse_string(server_settings_file.get_as_text())
apply_weapon_settings(server_settings["game"]["weapons"])
func save_client_settings():
var client_settings_file = FileAccess.open("./settings/client-settings.json", FileAccess.WRITE)

View File

@ -1,6 +1,6 @@
extends Node
var player_script := load("res://scripts/Player.gd")
var player_script = load("res://scripts/Player.gd")
var player_model = load("res://scenes/models/player.tscn")
var peer = ENetMultiplayerPeer.new()
var clients:Dictionary = {}
@ -26,7 +26,7 @@ func _Peer_Connected(client_id):
var internal_id = last_client_id + 1
last_client_id += 1
clients[client_id] = player_script.new().properties.duplicate()
clients[client_id] = GameData.properties_example.duplicate()
var client = clients[client_id]
client["position"] = Vector3(0, 10, 0)
client["internal_id"] = internal_id
@ -125,12 +125,15 @@ func shot(client_id):
var client_playermodel = ServerUtils.find_playermodel_by_internal_id(internal_id)
var raycast:RayCast3D = client_playermodel.get_node("Head/Camera/viewRaycast")
var weapon_raycast:RayCast3D = client_playermodel.get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
print("currect weapon: " + current_weapon)
raycast.target_position.z = -current_weapon_settings["range"]
raycast.force_raycast_update()
raycast.force_update_transform()
var target_point = raycast.get_collision_point()
weapon_raycast.target_position = weapon_raycast.to_local(target_point) * 1.1
weapon_raycast.force_raycast_update()
weapon_raycast.force_update_transform()
weapon_raycast.rotation.y = atan((weapon_raycast.position.x - client_playermodel.position.x) / ((-current_weapon_settings["range"]) - (abs(weapon_raycast.position.z - client_playermodel.position.z))))
weapon_raycast.target_position.y += current_weapon_settings["spreading"] * randf() * sin(randf() * 2 * PI)
@ -172,7 +175,7 @@ func shot(client_id):
var client_team = 1 if client["class_type"] > 0 else -1
if (target_client_team == client_team):
if (GameData.server_settings["game"]["gamemodes"][ServerUtils.gamemode]["firendlyfile"]):
if (GameData.server_settings["game"]["gamemodes"][str(ServerUtils.gamemode)]["friendlyfire"]):
target_client["HP"] -= damage
else:
target_client["HP"] -= damage
@ -206,13 +209,10 @@ func change_weapon(client_id, new_weapon_number):
var client = clients[client_id]
client["reloading"] = false
var internal_id = str(client["internal_id"])
for weapon in GameData.Weapons.keys():
if (GameData.server_settings["game"]["weapons"][weapon]["number"] == new_weapon_number):
client["current_weapon"] = GameData.server_settings["game"]["weapons"][weapon].duplicate()
break
client["current_weapon"] = client["weapons"][ServerUtils.find_weapon_name_by_number(new_weapon_number)]
var client_playermodel = ServerUtils.find_playermodel_by_internal_id(internal_id)
client_playermodel.change_weapon(new_weapon_number)
#NetUtils.send_everyone_except(client_id, ["change_weapon_puppet", internal_id, new_weapon_number])
client_playermodel.change_weapon.rpc_id(client_id, new_weapon_number)
NetUtils.send_everyone_except(client_id, [client_playermodel.change_weapon_puppet, internal_id, new_weapon_number])
@rpc("any_peer", "call_remote", "reliable")
@ -234,6 +234,7 @@ func get_map(client_id):
func choose_class(client_id, class_id):
var client = clients[client_id]
client["class_type"] = class_id
#client["HP"] = GameData.settings["game"]["classes"][class_id]["HP"]
#here are must be checks if the teams are balanced. WIP.
if class_id > 0:
ServerUtils.team_OS["members"].push_back(client)
@ -303,7 +304,7 @@ func spawn_player():
print(str(player_model))
playermodel = player_model.instantiate()
print(str(playermodel))
var properties = player_script.new().properties.duplicate()
var properties = GameData.properties_example.duplicate()
properties = player
properties["is_playable"] = false

View File

@ -18,22 +18,7 @@ enum Class_type {
var Weapons = GameData.Weapons
var properties = {
HP = 100,
AP = 100,
HACK = 1.0,
class_type = 0,
is_playable = false,
internal_id = 0,
nickname = "Unnamed",
ready = false,
current_weapon = null,
current_weapon_number = 0,
last_shot = 0,
reloading = false,
offline_mode = false,
position = Vector3(0, 5, 0)
}
var properties
var speed = 12
var walk = 12
@ -61,6 +46,7 @@ var round_status = {
@onready var camera: Camera3D = $Head/Camera
@onready var playerCharacterBody = $"."
@onready var collision_shapes = find_children("collision*","",false)
var HUD
var healthLabel
var armorLabel
@ -77,6 +63,7 @@ var winnerLabel
var killLogList
func set_properties(props):
print("Got props from server: " + str(props))
properties = props
$"Head/Nickname".text = properties["nickname"]
name = "player" + str(properties["internal_id"])
@ -125,12 +112,32 @@ func update_hud():
osScoreGameLabel.text = str(round_status["os_game_score"])
roundNumberLabel.text = "Round " + str(round_status["round_number"])
func find_weapon_name_by_number(number):
var name = ""
for weapon in game_settings["weapons"].keys():
if (game_settings["weapons"][weapon].number == number):
name = weapon
return name
@rpc("authority", "call_local", "reliable")
func change_weapon(new_weapon_number):
properties["reloading"] = false
var weapons = $"Head/Camera/Hand".get_children()
for weapon in weapons:
weapon.visible = false
weapons[new_weapon_number].visible = true
print("Changing weapon: " + str(new_weapon_number))
#if (properties["is_playable"]):
#properties["current_weapon"] = properties["weapons"][find_weapon_name_by_number(new_weapon_number)]
#properties["reloading"] = false
func find_weapon_in_inventory(number):
var found_weapon
for weapon in properties["weapons"].values():
if weapon["number"] == number:
found_weapon = weapon
break
return found_weapon
func find_weapon_by_number(number):
var found_weapon
@ -175,7 +182,10 @@ func update_weapon_raycast():
weapon_raycast.target_position = weapon_raycast.to_local(raycast.to_global(raycast.target_position) - weapon_raycast.position)
func try_shoot():
var current_weapon = game_settings["weapons"].find_key(find_weapon_by_number(properties["current_weapon"]["number"]))
print(str(properties["current_weapon"]))
#var current_weapon = game_settings["weapons"].find_key(find_weapon_by_number(properties["current_weapon"]["number"]))
var current_weapon = find_weapon_name_by_number(properties["current_weapon"]["number"])#game_settings["weapons"].find_key(find_weapon_by_number(properties["current_weapon"]["number"]))
print("currect weapon: " + current_weapon)
var current_weapon_settings = game_settings["weapons"][current_weapon]
properties["reloading"] = false
@ -183,13 +193,33 @@ func try_shoot():
return
if Input.is_action_pressed("shoot") and current_weapon_settings["fireRate"] >= 0.5 and not Input.is_action_just_pressed("shoot"):
return
time_since_last_shot = (Time.get_ticks_msec() - properties["last_shot"]) / 1000.
time_since_last_shot = (Time.get_ticks_msec() - properties["last_shot"]) / 1000.
if (time_since_last_shot > current_weapon_settings["fireRate"]):
if (!properties["offline_mode"]): Networking.shot.rpc_id(1, multiplayer.get_unique_id())
if (properties["current_weapon"]["magazine"] > 0):
properties["current_weapon"]["magazine"] -= 1
Networking.shot.rpc_id(1, multiplayer.get_unique_id())
properties["current_weapon"]["magazine"] -= 1
properties["last_shot"] = Time.get_ticks_msec()
var raycast:RayCast3D = get_node("Head/Camera/viewRaycast")
var weapon_raycast:RayCast3D = get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
raycast.target_position.z = -current_weapon_settings["range"]
raycast.force_raycast_update()
raycast.force_update_transform()
var target_point = raycast.get_collision_point()
weapon_raycast.target_position = weapon_raycast.to_local(target_point) * 1.1
weapon_raycast.force_raycast_update()
weapon_raycast.force_update_transform()
weapon_raycast.rotation.y = atan((weapon_raycast.position.x - position.x) / ((-current_weapon_settings["range"]) - (abs(weapon_raycast.position.z - position.z))))
weapon_raycast.target_position.y += current_weapon_settings["spreading"] * randf() * sin(randf() * 2 * PI)
weapon_raycast.target_position.z += current_weapon_settings["spreading"] * randf() * cos(randf() * 2 * PI)
weapon_raycast.force_raycast_update()
weapon_raycast.force_update_transform()
var trace = preload("res://scenes/models/bullet_trace.tscn").instantiate()
get_node("..").add_child(trace)
trace.init((weapon_raycast.global_position), (weapon_raycast.get_collision_point()))
func reload():
var current_weapon_instance = properties["current_weapon"]
@ -210,16 +240,17 @@ func reload():
func _unhandled_input(event):
if (!properties["is_playable"]): return
var weapon_change = 0
if Input.is_action_pressed("MWU"):
var weapon_number = wrap(properties["current_weapon"]["number"] + 1, 0, game_settings["weapons"].size())
properties["current_weapon"] = find_current_weapon_by_number(weapon_number)
if (!properties["offline_mode"]): Networking.change_weapon.rpc_id(1, multiplayer.get_unique_id(), properties["current_weapon"]["number"])
change_weapon(properties["current_weapon"]["number"])
weapon_change = 1
if Input.is_action_pressed("MWD"):
var weapon_number = wrap(properties["current_weapon"]["number"] - 1, 0, game_settings["weapons"].size())
properties["current_weapon"] = find_current_weapon_by_number(weapon_number)
if (!properties["offline_mode"]): Networking.change_weapon.rpc_id(1, multiplayer.get_unique_id(), properties["current_weapon"]["number"])
change_weapon(properties["current_weapon"]["number"])
weapon_change = -1
if (weapon_change != 0):
var new_weapon_number = wrap(properties["current_weapon"]["number"] + weapon_change, 0, game_settings["weapons"].size())
properties["current_weapon"] = find_weapon_in_inventory(new_weapon_number)
print(str(properties["current_weapon"]))
Networking.change_weapon.rpc_id(1, multiplayer.get_unique_id(), properties["current_weapon"]["number"])
if event is InputEventMouseMotion:
rotate_y(-event.relative.x * SENSETIVITY)
@ -227,10 +258,6 @@ func _unhandled_input(event):
camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-50), deg_to_rad(60))
func _physics_process(delta):
#for shape:CollisionShape3D in collision_shapes:
##shape.rotation = self.rotation
#shape.rotate_y(head.rotation.y)
#shapee.
if (!properties["is_playable"]): return
if (game_settings == null): return
if (multiplayer.multiplayer_peer == null):
@ -246,7 +273,7 @@ func _physics_process(delta):
if Input.is_action_just_pressed("reload"):
var current_weapon = game_settings["weapons"].find_key(find_weapon_by_number(properties["current_weapon"]["number"]))
if (!properties["offline_mode"]): Networking.client_reloading.rpc_id(1, multiplayer.get_unique_id())
Networking.client_reloading.rpc_id(1, multiplayer.get_unique_id())
properties["reloading"] = true
get_tree().create_timer(game_settings["weapons"][current_weapon]["reload"]).connect("timeout", reload)
@ -314,6 +341,8 @@ func set_game_settings(s):
acceleration = game_settings["moving"]["acceleration"]
inertia = game_settings["moving"]["inertia"]
change_weapon(properties["current_weapon"]["number"])
GameData.apply_weapon_settings(game_settings["weapons"])
Weapons = GameData.Weapons
@rpc ("authority", "call_remote", "reliable")
func teleport(pos):
@ -346,4 +375,6 @@ func end_round(result):
@rpc("authority", "call_remote", "reliable")
func kill_notification(killer, victim):
var entry = load("res://scenes/models/kill_log_entry.tscn").instantiate()
entry.get_node("killer").text = str(killer)
entry.get_node("victim").text = str(victim)
killLogList.add_child(entry)

View File

@ -12,10 +12,8 @@ func _ready():
func _unhandled_input(event):
if Input.is_action_pressed("MWU"):
walk += walk / 5.
print("UP " + str(walk))
if Input.is_action_pressed("MWD"):
walk -= walk / 5.
print("DOWN " + str(walk))
walk = clamp(walk, 0.01, 15)
if event is InputEventMouseMotion:
head.rotate_y(-event.relative.x * SENSETIVITY)

View File

@ -44,6 +44,13 @@ func check_gamemode_availability(gm):
return true
return false
func find_weapon_name_by_number(number):
var name = ""
for weapon in GameData.server_settings["game"]["weapons"].keys():
if (GameData.server_settings["game"]["weapons"][weapon].number == number):
name = weapon
return name
func find_weapon_by_number(number):
var found_weapon
for weapon in GameData.server_settings["game"]["weapons"].keys():
@ -152,6 +159,8 @@ func switch_map(new_map_path):
team_CS["spawnpoints"].push_back(spawnpoint)
elif spawnpoint.team > 0: # os
team_OS["spawnpoints"].push_back(spawnpoint)
var spectator = preload("res://scenes/models/spectator.tscn").instantiate()
server_map.add_child(spectator)
func send_scores():
NetUtils.send_everyone(["update_round_status", {

View File

@ -7,6 +7,13 @@
"gamemode": "TDM"
},
"game": {
"classes":{
"class_1":{
"HP": 1100000,
"AP": 10000,
"damage_mul": 0.0001
}
},
"gamemodes":{
"TDM": {
"duration": 15,