1.1 --- a/plugins/include/tf2_stocks.inc Tue Apr 22 00:44:14 2008 +0000
1.2 +++ b/plugins/include/tf2_stocks.inc Tue Apr 22 22:05:03 2008 +0000
1.3 @@ -110,7 +110,6 @@
1.4 stock TF2_SetPlayerClass(client, TFClassType:class, bool:weapons=true, bool:persistant=true)
1.5 {
1.6 SetEntProp(client, Prop_Send, "m_iClass", _:class);
1.7 - TF2_SetPlayerResourceData(client, TFResource_PlayerClass, class);
1.8
1.9 if (persistant)
1.10 {
1.11 @@ -139,14 +138,7 @@
1.12 return -1;
1.13 }
1.14
1.15 - static offset;
1.16 - static set = false;
1.17 -
1.18 - if (!set)
1.19 - {
1.20 - offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
1.21 - set = true;
1.22 - }
1.23 + new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
1.24
1.25 if (offset < 1)
1.26 {
1.27 @@ -166,6 +158,8 @@
1.28 /**
1.29 * Sets client data in the resource entity
1.30 *
1.31 + * Note: The game overwrites these values every frame, so changing them will have very little effect.
1.32 + *
1.33 * @param client Player's index.
1.34 * @param type ResourceType constant
1.35 * @param value Value to set.
1.36 @@ -179,14 +173,7 @@
1.37 return false;
1.38 }
1.39
1.40 - static offset;
1.41 - static set = false;
1.42 -
1.43 - if (!set)
1.44 - {
1.45 - offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
1.46 - set = true;
1.47 - }
1.48 + new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]);
1.49
1.50 if (offset < 1)
1.51 {