File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
9292 return 1 ;
9393}
9494
95- // native TF2_Burn(client, target)
95+ // native TF2_Burn(client, target, duration )
9696cell_t TF2_Burn (IPluginContext *pContext, const cell_t *params)
9797{
9898 static ICallWrapper *pWrapper = NULL ;
@@ -126,10 +126,17 @@ cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
126126 return pContext->ThrowNativeError (" Client index %d is not valid" , params[2 ]);
127127 }
128128
129+ float fDuration = 10.0 ;
130+ // Compatibility fix for the newly-added duration
131+ if (params[0 ] >= 3 )
132+ {
133+ fDuration = sp_ctof (params[3 ]);
134+ }
135+
129136 void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset );
130137 ArgBuffer<void *, CBaseEntity*, CBaseEntity*,
131138 float > // duration
132- vstk (obj, pTarget, nullptr , 10 . 0f );
139+ vstk (obj, pTarget, nullptr , fDuration );
133140
134141 pWrapper->Execute (vstk, nullptr );
135142 return 1 ;
Original file line number Diff line number Diff line change @@ -245,13 +245,16 @@ enum TFObjectMode
245245};
246246
247247/* *
248- * Sets a client on fire for 10 seconds.
248+ * Sets a client on fire.
249+ *
250+ * @note Fire duration is capped to 10 seconds.
249251 *
250252 * @param client Player's index.
251253 * @param attacker Attacker's index.
254+ * @param duration Duration of fire (in seconds).
252255 * @error Invalid client index, client not in game, or no mod support.
253256 */
254- native void TF2_IgnitePlayer (int client , int attacker );
257+ native void TF2_IgnitePlayer (int client , int attacker , float duration = 10.0 );
255258
256259/* *
257260 * Respawns a client
You can’t perform that action at this time.
0 commit comments