Re-add method

This commit is contained in:
Jackzie 2024-07-13 21:43:10 -05:00
parent 59d4310a94
commit 6f99a1279d
3 changed files with 1640 additions and 1643 deletions

Binary file not shown.

View file

@ -297,9 +297,7 @@ enum struct PropSelector {
int ref = EntIndexToEntRef(entity); int ref = EntIndexToEntRef(entity);
if(this.GetEntityRefIndex(ref) == -1) { if(this.GetEntityRefIndex(ref) == -1) {
PrintToServer("Selector.AddEntity: PRE CALLBACK"); if(this.selectPreCallback != null && useCallback) {
// FIXME: crashes server, sourcemod bug
/*if(this.selectPreCallback != null && useCallback) {
Call_StartForward(this.selectPreCallback) Call_StartForward(this.selectPreCallback)
Call_PushCell(this._client); Call_PushCell(this._client);
Call_PushCell(entity); Call_PushCell(entity);
@ -308,19 +306,18 @@ enum struct PropSelector {
Call_Finish(allowed); Call_Finish(allowed);
PrintToServer("Selector.AddEntity: PRE CALLBACK pre result %b", allowed); PrintToServer("Selector.AddEntity: PRE CALLBACK pre result %b", allowed);
if(!allowed) return -2; if(!allowed) return -2;
}*/ }
L4D2_SetEntityGlow(entity, L4D2Glow_Constant, 10000, 0, this.selectColor, false); L4D2_SetEntityGlow(entity, L4D2Glow_Constant, 10000, 0, this.selectColor, false);
int index = this.list.Push(ref); int index = this.list.Push(ref);
PrintToServer("Selector.AddEntity: post CALLBACK pre"); PrintToServer("Selector.AddEntity: post CALLBACK pre");
//FIXME: crashes server, sourcemod bug if(this.selectPostCallback != null && useCallback) {
/*if(this.selectPostCallback != null && useCallback) {
Call_StartForward(this.selectPostCallback) Call_StartForward(this.selectPostCallback)
Call_PushCell(this._client); Call_PushCell(this._client);
Call_PushCell(entity); Call_PushCell(entity);
//Call_PushCell(index); //Call_PushCell(index);
Call_Finish(); Call_Finish();
}*/ }
PrintToServer("Selector.AddEntity: post CALLBACK post"); PrintToServer("Selector.AddEntity: post CALLBACK post");
return index; return index;
} }