ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.72k stars 625 forks source link

25th Anniversary Client side lasserdot for rocket launcher #3423

Open DarthMan opened 1 year ago

DarthMan commented 1 year ago

Hello,

Currently, the laserdot entity from the RPG is laggy when your ping is higher than 0, as all the code is executed server-side. Would it be possible to make the lasserdot entity used by the rocket launcher move client-side, just like it does on TFC for the sniper rifle and somehow make the server predict exactly where it's position would be? This was done on HL2, so must be possible on goldsource as well. Also if possible, please no new private data members /game functions or anything like that, because they can break custom server plugins and this must be prevented at all costs.

Cheers, DarthMan

dystopm commented 1 year ago

Also if possible, please no new private data members /game functions or anything like that, because they can break custom server plugins and this must be prevented at all costs.

Clearly they wont be limited to this restriction. Mod needs to break previous structures to make it work better. Many people will need to update their custom binaries to achieve this

Balimbanana commented 1 year ago

This was done on HL2, so must be possible on goldsource as well.

It is not done on HL2: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/hl2mp/weapon_rpg.cpp#L59 It is a CBaseEntity which is created server-side here: https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/hl2mp/weapon_rpg.cpp#L2145 If you want the SP version of HL2 code, it also uses an entity: https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/game/server/hl2/weapon_rpg.cpp#L2280

It is true that TF2 uses tempent/client-side sprites for their dots, not sure about TFC, but probably.

This is more of a feature request.

DarthMan commented 1 year ago

Replying to https://github.com/ValveSoftware/halflife/issues/3423#issuecomment-1817301637

I played HL2 Multiplayer and the laser movement was clearely super fast and not laggy as the HL1 one.