Forum

> > CS2D > General > CS2D Bug Reports
Forums overviewCS2D overviewGeneral overviewLog in to reply

English CS2D Bug Reports

2,043 replies
Page
To the start Previous 1 246 47 48102 103 Next To the start

old Re: CS2D Bug Reports

SQ
Moderator Off Offline

Quote
People should download hotfix. I think it's already up, replaced old download.

old Re: CS2D Bug Reports

VADemon
User Off Offline

Quote
If 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".

> Follow Player should be unavailable when there's nobody to spectate. Switch to "Free Look" automatically.

---------

CS2D's Log output bundling interferes with cs2d lua hook 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
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 cs2d lua hook 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
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
line
variable 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")
As it will also crash the client (New game server).

old Re: CS2D Bug Reports

xsiN
User Off Offline

Quote
@user DC: No. I've never checked console after this glitch happens, but like @user 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.

old Re: CS2D Bug Reports

Mami Tomoe
User Off Offline

Quote
There is nothing on the console and it has been there for a few years I assume.
You can some how cause it if you quickly reconnect to a certain server (NOT LOCAL)

old Re: CS2D Bug Reports

Mora
User Off Offline

Quote
This being since along ago. Console says nothing, it just stops to say "usgn state - playing" and no message "Disconnected" is written.

the chance is increased to get it when you say /retry and click "cancel" and again click on server(w/o waiting 5 sec).

old Re: CS2D Bug Reports

SQ
Moderator Off Offline

Quote
Oh sh*t, in this case always show 2D and 3D.. this might be related to that. I'll take a look when I'll have free time.

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 05:56:09 pm

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
Ahh thanks a lot for the background info regarding that weird disconnect issue. Hah.. I'm afraid that will be a tough one to fix but we'll see.

@user 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 07:20:19 pm

old Re: CS2D Bug Reports

Masea
Super User Off Offline

Quote
user VADemon has written
If 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".
What about if we don't want to let people see several places of map?

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
@user 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.

old Re: CS2D Bug Reports

saint-
User Off Offline

Quote
I 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?

old Re: CS2D Bug Reports

Mami Tomoe
User Off Offline

Quote
user saint- has written
I 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?


Use 16:9 to get rid of the black boarders


@user 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 09:57:02 pm

old Re: CS2D Bug Reports

saint-
User Off Offline

Quote
Thanks, that removed all the black boarders, but I was used to have the black boarders on left and right, that way it looked like the screen was a square but I guess I can't get that back.

I'll try to get used to fullscreen then.

old Re: CS2D Bug Reports

Iamle0
User Off Offline

Quote
Mouse "absolute" position(when centered on player) and player positions are not the same. Please correct me if I am wrong.

Game resolution: 1600x900
Running in a window.

Used script + Screenshot
https://git.io/v945M
IMG:https://i.imgur.com/AITtXFYm.png

old Re: CS2D Bug Reports

Iamle0
User Off Offline

Quote
user 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
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

old Re: CS2D Bug Reports

SQ
Moderator Off Offline

Quote
If you already hold mouse on the player, it adds half screen coordinates.
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.
To the start Previous 1 246 47 48102 103 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview