Forum
General
CS2D Bug Reports
Follow Player should be unavailable when there's nobody to spectate. Switch to "Free Look" automatically.---------
CS2D's Log output bundling interferes with
log Code used to Show Server TPS in HUD:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("log", "apple_fps")
function apple_fps(line)
	local fps, frametime = line:match("Current FPS: (%d+).-(%d+ ms)")
	local linex = line:sub(2)
	
	if fps and frametime then
		parse("hudtxt2 ".. 1 .." ".. 0+4 .." \"[" .. os.clock() .."] FPS: ".. fps .. " || Frametime: ".. frametime .."\" 0 170 0")
	
		return 1
	else
		parse("hudtxt2 ".. 1 .." ".. 0+4 .." \"[" .. os.clock() .."] ".. linex .."\" 0 170 0")
	end
end
addhook("ms100", "apple_requestfps")
function apple_requestfps()
	--print(os.clock())
	parse("fps")
end
If the log line caused by parse("fps") doesn't change, then the hook will receive misleading lines about bundling: " (1x), " (2x) and so on. Theoretically it can be handled, but it must be noted on the
log help page.You can also circumvent the log bundling if you uncomment the line
--print(os.clock()).
--------- Onto the next issue:
This code will produce:
EXCEPTION_STACK_OVERFLOW for 1.0.0.3 (no hotfix version)
EXCEPTION_ACCESS_VIOLATION for 1.0.0.2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("log", "apple_fps")
function apple_fps(line)
	local fps, frametime = line:match("Current FPS: (%d+).-(%d+ ms)")
	local linex = line --:sub(2) -- THIS LINE IS DIFFERENT TO CODE FROM ABOVE
	
	if fps and frametime then
		parse("hudtxt2 ".. 1 .." ".. 0+4 .." \"[" .. os.clock() .."] FPS: ".. fps .. " || Frametime: ".. frametime .."\" 0 170 0")
	
		return 1
	else
		parse("hudtxt2 ".. 1 .." ".. 0+4 .." \"[" .. os.clock() .."] ".. linex .."\" 0 170 0")
	end
end
addhook("ms100", "apple_requestfps")
function apple_requestfps()
	--print(os.clock())
	parse("fps")
end
In fact, every modification of
linevariable seems to cause an error. E.g. you can't simply do this in line 11:
1
parse("hudtxt2 ".. 1 .." ".. 0+4 .." \"[" .. os.clock() .."] ".. line .."\" 0 170 0")
DC: No. I've never checked console after this glitch happens, but like @
Mami Tomoe: it has been ocurring since 1.0.0.2, although it was less frequent.I'll try to get a screenshot of the console next time that this happens.
You can some how cause it if you quickly reconnect to a certain server (NOT LOCAL)
the chance is increased to get it when you say /retry and click "cancel" and again click on server(w/o waiting 5 sec).
CS2D 1.0.0.3 version (+ hotfix): In zm_street map the explosive crates have a wrong/weird model. Here's a screenshot to make things clear.Edit: That's a map problem, they made floor tile a breakable.. that leads to a "wall" type breakable to be flat. In other words it takes height values from tileset properties
It is kinda the way it should work though.
Fix would be just to change tile type of that tile into wall.
edited 1×, last 01.05.17 03:56:09 pm
@
VADemon: Thanks for the detailed description.The log-hook batching issue will be fixed in the next release. This means you will always get the original log text in the log hook even if the stuff will get bundled when writing it.
Have to check the other stuff.
That spectator stuff is not a big issue in my opinion because you normally won't just spectate empty maps but might try to fix it...
edited 1×, last 01.05.17 05:20:19 pm
VADemon has writtenIf you join the spectator team and there're no other players/bots, you may be locked into a random place to spectate, because the default setting is "Follow Player".
Masea: There is really no reason to prevent them from doing that if the map is entirely empty (no players). They could do so anyway by loading it in the map editor.
DC: Hell yeah, forget about that! Resolution 640x480 (4:3)
Color Depth: 32 Bit
Graphics Driver: DirectX
Window Mode: Fullscreen
The Main menu shows some black boarders on the left and right side as I'm used. But when I join the server, there appear some black boarders on the top and down of the screen aswell.
Is this normal?
saint- has writtenI used the CS2D Launcher
Resolution 640x480 (4:3)
Color Depth: 32 Bit
Graphics Driver: DirectX
Window Mode: Fullscreen
The Main menu shows some black boarders on the left and right side as I'm used. But when I join the server, there appear some black boarders on the top and down of the screen aswell.
Is this normal?
Resolution 640x480 (4:3)
Color Depth: 32 Bit
Graphics Driver: DirectX
Window Mode: Fullscreen
The Main menu shows some black boarders on the left and right side as I'm used. But when I join the server, there appear some black boarders on the top and down of the screen aswell.
Is this normal?
Use 16:9 to get rid of the black boarders
@
Promaster: Do this in your script:parse("mp_hudscale 2") Or anything from 0 to 3 that will work (2 worked for me)
edited 1×, last 01.05.17 07:57:02 pm
Mami Tomoe: ty it worked
Admin/mod comment
Removed unnecessary quote. /
GeoB99 I'll try to get used to fullscreen then.
Game resolution: 1600x900
Running in a window.
Used script + Screenshot
https://git.io/v945M
SQ: It's right there. In my reply.I'll repost it here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Players = {}
addhook("join", "playerJoined")
function playerJoined(pid)
Players[pid] = {}
end
addhook("ms100", "sendPos")
function sendPos()
for pid, pl in pairs(Players) do
reqcld(pid, 2)
end
end
addhook("clientdata", "PlayerMousePosUpdate")
function PlayerMousePosUpdate(pid, mode, mouseX, mouseY)
parse('hudtxt2 '.. pid ..' 0 "mouseX: '.. mouseX ..' mouseY: '.. mouseY ..'" 500 200')
parse('hudtxt2 '.. pid ..' 1 "x: '.. Players[pid].x ..' y: '.. Players[pid].y .. '" 500 224')
end
addhook("move", "playerMove")
function playerMove(pid, x, y, walk)
Players[pid].x = x
Players[pid].y = y
end
So you are comparing PlayerPositionX + ScreenWidth / 2
Or it might be broken, not really sure, also check if mp_hudscale does bring different result. That might be another resolution stuff issue, thought my scripts somehow are working.
CS2D Bug Reports


Offline

