Forum

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

English CS2D Bug Reports

2,074 replies
Page
To the start Previous 1 2103 104 Next To the start

old Re: CS2D Bug Reports

StirlizZ-Fapicon
Super User Off Offline

Quote
Oh, so THIS is bug reports where are, lemme contribute too.

Both problems are sync between server and client related.

1. If entity env_sprite placed outside the map switching states for it doesnt work for clients, works pretty fine for Server tho.

2. If trigger_Start triggers trigger_if it doesnt affect clients, only server. For example if I want to remove dyn_wall with trigger_if at start of round, only server will see these walls removed and client still have visual and collision of a wall exist. For clients server player phase through the wall and can inflict damage from the other side.

old Re: CS2D Bug Reports

Infinite Rain
Reviewer Off Offline

Quote
The
imageparam(id, "alpha")
call always returns 0, no matter what the actual alpha value of the image is. The
object(id, "alpha")
, on the other hand, returns the correct value.

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
@user Infinite Rain: It actually returns the rotation. lol. Thanks, will be fixed with the next version.

@user Mami Tomoe: cs2d lua cmd imageparam has additional image specific features that cs2d cmd object doesn't provide: path, frame, width, height, framecount

Of course these could have been added to cs2d lua cmd object but it would make cs2d cmd object pretty huge and add a lot of params which only work with images. Also for new script people it's easier to find cs2d lua cmd imageparam when working with images than cs2d lua cmd object if they aren't aware that images are also objects. Furthermore when working with images you get more expressive code when using cs2d lua cmd imageparam as it directly clarifies that you're working with images.

But yes: x, y and rot are indeed redundant and the same as cs2d lua cmd object and it is a questionable software design decision. Now since both are in the game none of them will be removed because it would break existing scripts.

old Re: CS2D Bug Reports

Masea
Super User Off Offline

Quote
Using cs2d cmd setammo to set ammoin value of Satchel Charge to 0 actually sets it to 1. Apparently there is no way to set its ammo to 0 via script.

old Re: CS2D Bug Reports

Hajt
User Off Offline

Quote
Default bot AI scripts

general.lua line 117 - wrong field name
py uses "tilex" instead of "tiley". fai_randomadjacent never searches outside
the current row so bots can't scatter properly when flashed.
1
2
py=player(id,"tilex")  -- bug
py=player(id,"tiley")  -- fix

buy.lua - CT rifles-only branch, famas never bought
money>=2000 is checked before money>=2250 so the famas line is never reached..

general.lua - 4 missing locals in fai_randomadjacent
px, py, x and y are globals. With multiple bots ticking per frame they silently
overwrite each other.

radio.lua - regroup loop uses index instead of player id
for mate=1,#mates iterates 1,2,3 but mates contains player IDs so
vai_mode[mate] writes to the wrong slots
1
2
for mate=1,#mates do            -- wrong, mate is 1 2 3
for _,mate in ipairs(mates) do  -- correct

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
@user Masea: Hah.. interesting. That's probably a safeguard which was added for grenades so you can't set a 0 amount for them which would lead to a messed up state where you have 0 grenades in the inventory. I would say the best way would be to just remove the item but of course this make no sense for satchel charge because you sitll need to trigger the explosions...

@user Hajt: Oh! Thanks, will check these and add the fixes to the next release.

old Re: CS2D Bug Reports

Masea
Super User Off Offline

Quote
@user DC: I understand it would be rare to want to be able to use the Satchel Remote. But it is a brilliant way to actually block the actual attack process on a script that has custom UI buttons. There are quite a few mods out there with custom UI buttons, and the interactions with them are done with mouse1, which conflicts with fire actions of player's current weapon. I managed a way to simply set the desired weapon (Satchel Remote in this case) upon button interaction in my script, so players won't really fire or attack their weapons upon button clicks. The only missing part is that I cannot set Satchel's ammo to 0.

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
@user Masea: I see. I quickly checked and it was exactly what I assumed. Will add an exception for satchel charge so you will be able to set the amount to 0 with the next release

old Re: CS2D Bug Reports

Hajt
User Off Offline

Quote
user DC has written
@user Hajt: Oh! Thanks, will check these and add the fixes to the next release.

Thank You, actually there is more things if you dont mind..

if d < -180 never executes because % 360 never yields negative values, fixed:
1
2
3
4
5
6
-- general.lua line 19
function fai_angledelta(a1, a2)
    local d = (a2 - a1) % 360
    if d > 180 then d = d - 360 end
    return d
end

engage.lua since 1.0.0.3 changed the resolution from 640x480 to 850x480,old range are too narrow on the X axis i guess
1
2
3
4
-- before (640px era, half-width 320px)
if math.abs(x1-x2)<420 and math.abs(y1-y2)<235 then
-- after (850px, half-width 425px)
if math.abs(x1-x2)<450 and math.abs(y1-y2)<250 then

radio.lua - regroup/fallback loops (wrong player ID? ) use for mate=1,#mates where mates is a table of player IDs. So mate ends up as 1, 2, 3 instead of the actual IDs.

old Re: CS2D Bug Reports

DC
Admin Off Offline

Quote
I don't understand why you want me to change engage.lua that way. Old values look fine to me.
420 is already half of 840. 235 is already (nearly) half of 480 (not sure why I reduced it by 5 but there probably was a reason, most likely the player size which doesn't fill a tile completely)

Will apply the other fixes, thanks!

old Re: CS2D Bug Reports

mrc
User Off Offline

Quote
I can provide my Bots AI. Furthermore, it's all in one file, organized into modules, and easy to understand.
edited 1×, last 26.07.26 08:04:18 pm

old Re: CS2D Bug Reports

Hajt
User Off Offline

Quote
user DC has written
Will apply the other fixes, thanks!

Actually i spot 2 kleine bugs, rest thanks to Claude AI its soo nice to do code review and stuff man

@user mrc: hey, dunno if i host a server right now but thanks as well

old Re: CS2D Bug Reports

mrc
User Off Offline

Quote
Just a rough dump of notes, not a request — putting it here in case you ever feel like poking at any of it. No pressure, no timeline.

A few observations based on the July 26 build shared on Discord.

Rendering / Window

1. DX Fullscreen (res < desktop): window opens top-left instead of centered.
2. DX Windowed/Fullscreen (res = desktop): content cropped at the bottom. Tested forcing a borderless window style externally and the crop persisted, so it's likely not the window style — possibly the backbuffer/viewport size for that specific case.
3. Cursor lag (sprite drawn in render loop, confirmed with -systemmouse). Likely fix: native OS cursor via SetCursor + handle WM_SETCURSOR (Win32), for both drivers.
4. UI becomes unclickable after changing resolution or switching fullscreen/windowed (DX only).

Visual / UI

5. Team Select screen — CT2 holding a primary weapon with both hands.
6. CT SMG select screen. Current: MP5, P90, UMP45, TMP. Fix: MP5, TMP, P90, UMP45.
7. Wrong scale on Bomb/Defuse Kit shadow (Lighting = Low/Medium/High only) when carrying it.
8. Dead/Spectator screen, round time = infinite: "infinite" HUD icon scaled wrong (top-right).

Gameplay / Netcode

9. Recoil influences accuracy — hit direction desync when enabled. Try feeding the shoot/recoil code (weapon_recoil_accuracy, Tshoot.Shoot) to an AI.
10. Old "ghost grenade" bug — also looks like a sync issue, worth feeding the grenade code too.
11. Water tile effect desync: effect renders correctly only when the camera is exactly on the same tile as the player standing in water (e.g. spectating that player in follow-cam). In any other case — alive and not on that tile, free-cam spectator not on that tile, or following a different nearby player — the water effect shows up in the wrong position.
edited 7×, last 28.07.26 12:38:35 am
To the start Previous 1 2103 104 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview