rehlds / ReGameDLL_CS

Enhanced server-side GameDLL for Counter-Strike 1.6 (and CS: Condition Zero), offering new features and fixes.
https://rehlds.dev/docs/regamedll-cs
GNU General Public License v3.0
590 stars 203 forks source link

Weapons.cpp Assert #1007

Open cyxnzb opened 2 months ago

cyxnzb commented 2 months ago

Assert:weapons.cpp{1960}:Assertion Failed:iAmmoPickup!=0 Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.14.0.840-dev Build date: 04:03:25 Aug 16 2024 (3779) Build from: https://github.com/dreamstalker/rehlds/commit/01c1154

ReGameDLL version: 5.28.0.737-dev

dystopm commented 2 months ago

This assert is related to grenades itself. Have you edited your grenades weapons behaviour? Maybe something is altering main behaviour

cyxnzb commented 2 months ago

This assert is related to grenades itself. Have you edited your grenades weapons behaviour? Maybe something is altering main behaviour

Thank you for your reply I use grenade related plugins on my server, including "nademodes", "zombieplague4.3", "zombieplague insect bomb", and "antidote bomb". Do I need to ban them one by one to troubleshoot the issue?

dystopm commented 2 months ago

There is no danger at all, no need to ban anyone. Try to provide the sources of those plugins so we can try to catch the issue. It is a latest commit that improves nade pickup behaviour and that assert message is harmless

cyxnzb commented 2 months ago

There is no danger at all, no need to ban anyone. Try to provide the sources of those plugins so we can try to catch the issue. It is a latest commit that improves nade pickup behaviour and that assert message is harmless

I understand now. The main issue is that it can cause the server to crash abnormally.I will upload the relevant source code when I have time

lespaul64 commented 2 months ago

This happen to me too while playing dodge ball mod when using current git of regamedll. This issue wont happen on older regamedll. While the message is harmless, it still can freeze and crash your server.

So i decide to look for weapons.cpp file and put a comment on https://github.com/s1lentq/ReGameDLL_CS/blob/dc16b12d7976f03d20b81f9a2491ee7dddbb9b8e/regamedll/dlls/weapons.cpp#L1960

like this //Assert(iAmmoPickup != 0); so your server wont freeze & crash anymore.

dystopm commented 2 months ago

This happen to me too while playing dodge ball mod when using current git of regamedll. This issue wont happen on older regamedll. While the message is harmless, it still can freeze and crash your server.

So i decide to look for weapons.cpp file and put a comment on

https://github.com/s1lentq/ReGameDLL_CS/blob/dc16b12d7976f03d20b81f9a2491ee7dddbb9b8e/regamedll/dlls/weapons.cpp#L1960

like this //Assert(iAmmoPickup != 0); so your server wont freeze & crash anymore.

Got the source of that plugin?

lespaul64 commented 2 months ago

This happen to me too while playing dodge ball mod when using current git of regamedll. This issue wont happen on older regamedll. While the message is harmless, it still can freeze and crash your server. So i decide to look for weapons.cpp file and put a comment on https://github.com/s1lentq/ReGameDLL_CS/blob/dc16b12d7976f03d20b81f9a2491ee7dddbb9b8e/regamedll/dlls/weapons.cpp#L1960

like this //Assert(iAmmoPickup != 0); so your server wont freeze & crash anymore.

Got the source of that plugin?

I can only provide you a partial code since it was a private mod for my team. You can view the code here --> https://pastebin.com/HfwvJJAR

dystopm commented 2 months ago

This happen to me too while playing dodge ball mod when using current git of regamedll. This issue wont happen on older regamedll. While the message is harmless, it still can freeze and crash your server. So i decide to look for weapons.cpp file and put a comment on https://github.com/s1lentq/ReGameDLL_CS/blob/dc16b12d7976f03d20b81f9a2491ee7dddbb9b8e/regamedll/dlls/weapons.cpp#L1960

like this //Assert(iAmmoPickup != 0); so your server wont freeze & crash anymore.

Got the source of that plugin?

I can only provide you a partial code since it was a private mod for my team. You can view the code here --> https://pastebin.com/HfwvJJAR

Coded assert seen above is related to weaponbox grenade touching, your provided code doesn't help too much. You are allowing grenade dropping. Check CWeaponBox::Touch to understand the basic workflow of how this assert can appear. See how are you managing weaponboxes grenades in your addon since you're not providing source code. That commit was a fix for another past issue

cyxnzb commented 2 months ago

This happen to me too while playing dodge ball mod when using current git of regamedll. This issue wont happen on older regamedll. While the message is harmless, it still can freeze and crash your server.

So i decide to look for weapons.cpp file and put a comment on

https://github.com/s1lentq/ReGameDLL_CS/blob/dc16b12d7976f03d20b81f9a2491ee7dddbb9b8e/regamedll/dlls/weapons.cpp#L1960

like this //Assert(iAmmoPickup != 0); so your server wont freeze & crash anymore.

Older version? What's that version?