CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

Incendiary grenade entity has DesignerName "molotov_projectile"

Open Zeviot opened this issue 1 year ago • 5 comments

This is what I get from printing all the properties of the incendiary entity received in the function OnEntitySpawnedHandler:

IsValid=True
EntityIndex=Entity Index 444
Index=444
DesignerName=molotov_projectile
PrivateVScripts=
Entity=CounterStrikeSharp.API.Core.CEntityIdentity
CScriptComponent=
VisibleinPVS=True
Handle=1635711260672
EntityHandle=Index = 444, Serial = 4330

Designer name should be "incendiary_projectile".

Zeviot avatar Aug 11 '24 18:08 Zeviot

I believe this can be fixed by changing the class inherited by IncediaryGrenade to "BaseCSGrenade". Although, I am not sure if this is enough. I would appreciate some guidance on this.

Zeviot avatar Aug 11 '24 18:08 Zeviot

Molotovs and Incendiary nades use same projectile entity with different models

GamerXCZ avatar Aug 11 '24 18:08 GamerXCZ

These are generated from valves code directly, so if that is the designer name then it's correct, as @GamerXCZ mentions

roflmuffin avatar Aug 12 '24 00:08 roflmuffin

Ok, I understand. Am I correct that the classes are being generated from the "cs2_schema.json" file? Since molotovs and incendiary are quite different now with different durations and spreads, its it possible that "cs2_schema.json" is outdated? Where can I find the script that generates this json, I can't seem to find it.

Zeviot avatar Aug 12 '24 02:08 Zeviot

that's how it should work, using same entity to handle 2 different throwables

Yarukon avatar Aug 12 '24 03:08 Yarukon