Tsuey / L4D2-Community-Update

Help us shape the potential future of L4D2 vanilla.
70 stars 23 forks source link

Problems and suggestions related to events in the game. #37

Open A1mDev opened 3 years ago

A1mDev commented 3 years ago

Because the community uses events when writing plugins, which helps and simplifies coding, i think I need to open this topic. Most likely this topic will be replenished.

  1. Recently added event to the game 'tank_rock_killed'. Works great, but if you take a shotgun and shoot at a tank rock, this event will be triggered for each pellet. I also really want the developers to add an entity index to this event, otherwise it is of little use, and possibly the thrower index, although you can get it via netprop.

  2. Event 'weapon_fire'. Сalled 2 times for weapon 'tank_claw' and also if you start pickup a tank rock and hold down the button IN_ATTACK, this event will be called every frame although you cannot use a weapon 'tank_claw' at this moment, or at the very beginning you can make a trick (bug?) 'tank punch rock'. Because these events are called in the game code itself, this tells us that there are some problem in the game code. I would like the developers to also add a weapon index to this event.

  3. Event 'ability_use'. This event never works for the jockey ability 'ability_leap' and the entity index needs to be added.

  4. Event 'triggered_car_alarm'. I would like the developers to also add the car entity index to this event and since this event is called from several places, it would not be bad to add a reason why the alarm was triggered, if the reason for turning on the alarm was damage, then need to add the type of damage.

Right now, to get around these problems or limitations, you need to write a huge code also using signatures and this code does not always work correctly. Some examples of plugins: l4d2_skill_detect, l4d2_stats, l4d_tank_rock_destroyer_announce. I in no way want to say that these plugins are bad, it's just that it would be much better to use events, it would not require a huge amount of server resources for simple messages to players.

Mart-User commented 3 years ago

I would recommend creating the "bile_thrown" and "pipebomb_thrown" events aswell.

We already have a "molotov_thrown" event.

While in L4D1 we won't have it and still would need to do some workarounds to detect it, would help a lot on L4D2 support.

"weapon_pickup" event with an extra "userid" parameter would help either.

Mart-User commented 2 years ago

Probably could add the other "*_killed" events as well, since there is one already for tank/witch/charger/spitter/jockey

alexiscoutinho commented 2 years ago

Furthermore:

  1. player_death shouldn't have entityid because infected and witches aren't players.
  2. infected_death currently returns a blank infected_id.
A1mDev commented 2 years ago

Another bug with the event 'weapon_zoom'. This event is called very often when unzoom happens, should be 1 call when zoom and 1 call when unzoom.

alexiscoutinho commented 1 year ago
  1. witch_harasser_set only fires once despite the bool key first suggesting otherwise.
alexiscoutinho commented 1 year ago
  1. player_hurt_concise doesn't fire when a player with a changed m_iTeamNum takes damage while player_hurt and AllowTakeDamage do.
  2. revive_end doesn't fire if the Witch does the killing blow (per Shadowysn).