roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
812 stars 130 forks source link

Incendiary grenade entity has DesignerName "molotov_projectile" #544

Open Zeviot opened 3 months ago

Zeviot commented 3 months ago

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 commented 3 months ago

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.

GamerXCZ commented 3 months ago

Molotovs and Incendiary nades use same projectile entity with different models

roflmuffin commented 3 months ago

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

Zeviot commented 3 months ago

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.

Yarukon commented 3 months ago

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