3
3
#define DEBUG
4
4
5
5
#define PLUGIN_AUTHOR " BattlefieldDuck"
6
- #define PLUGIN_VERSION " 1.0 "
6
+ #define PLUGIN_VERSION " 1.1 "
7
7
8
8
#include <sourcemod>
9
9
#include <sdktools>
@@ -82,7 +82,7 @@ public void OnMapStart()
82
82
83
83
if (StrEqual (strModel , MODEL_POINTER ))
84
84
{
85
- CreateTimer (0.0 , Timer_SecurityLaser , EntIndexToEntRef (index ));
85
+ CreateTimer (cvfRefreshRate . FloatValue , Timer_SecurityLaser , EntIndexToEntRef (index ), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE );
86
86
}
87
87
}
88
88
}
@@ -104,7 +104,7 @@ public void OnLaserPointerSpawn(int entity)
104
104
105
105
if (StrEqual (strModel , MODEL_POINTER ))
106
106
{
107
- CreateTimer (0.0 , Timer_SecurityLaser , EntIndexToEntRef (entity ));
107
+ CreateTimer (cvfRefreshRate . FloatValue , Timer_SecurityLaser , EntIndexToEntRef (entity ), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE );
108
108
}
109
109
}
110
110
}
@@ -126,7 +126,7 @@ public Action Timer_SecurityLaser(Handle timer, int pointerref)
126
126
int pointer = EntRefToEntIndex (pointerref );
127
127
if (pointer == INVALID_ENT_REFERENCE )
128
128
{
129
- return Plugin_Continue ;
129
+ return Plugin_Stop ;
130
130
}
131
131
132
132
float fpointerpos [3 ], fpointerang [3 ];
@@ -142,11 +142,9 @@ public Action Timer_SecurityLaser(Handle timer, int pointerref)
142
142
int g_iLaserColor [4 ];
143
143
GetEntityRenderColor (pointer , g_iLaserColor [0 ], g_iLaserColor [1 ], g_iLaserColor [2 ], g_iLaserColor [3 ]);
144
144
145
- TE_SetupBeamPoints (fpointerpos , GetPointAimPosition (fpointerpos , fpointerang , 999999.9 , pointer ), g_iModelIndex [iSkin ], g_iHaloIndex [iSkin ], 0 , 0 , cvfRefreshRate .FloatValue * 2 , fSize , fSize , 0 , 0.0 , g_iLaserColor , 0 );
145
+ TE_SetupBeamPoints (fpointerpos , GetPointAimPosition (fpointerpos , fpointerang , 999999.9 , pointer ), g_iModelIndex [iSkin ], g_iHaloIndex [iSkin ], 0 , 0 , cvfRefreshRate .FloatValue * 2.0 , fSize , fSize , 0 , 0.0 , g_iLaserColor , 0 );
146
146
TE_SendToAll ();
147
147
148
- CreateTimer (cvfRefreshRate .FloatValue , Timer_SecurityLaser , pointerref );
149
-
150
148
return Plugin_Continue ;
151
149
}
152
150
0 commit comments