Giter Club home page Giter Club logo

sm-tf2classic-tools's People

Contributors

azzyr avatar bigmazi avatar iane9 avatar sapphonie avatar scags avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sm-tf2classic-tools's Issues

Include file is broken

From J-Tanzanite/Little-Anti-Cheat#163

error 017: undefined symbol "TF2_GetResourceEntity"
error 017: undefined symbol "TF2_GetResourceEntity"
error 017: undefined symbol "GetPlayerWeaponSlot"
error 017: undefined symbol "RemovePlayerItem"
error 017: undefined symbol "AcceptEntityInput"

The include file is broken when trying to compile Little-Anti-Cheat, and the error indicates that tf2c.inc throws undefined symbol error so I will post here as well.

[Bug] GetPlayerResourceEntity() returns an index that's 4096 higher than reality

The native GetPlayerResourceEntity() returns the index of the tf_player_manager entity. Typically this is something very low like 32. But on two servers I have access to running SM 1.11 with TF2C Tools, the index returned is exactly 4096 higher than the actual index.

Examples:

  1. Server 1 has maxplayers set to 33. The index of tf_player_manager is 41. The native returns 4137.
  2. Server 2 has maxplayers set to 24. The index of tf_player_manager is 32. The native returns 4128.

The returned index alternates consistently between being correct and incorrect each time the map is changed. I suppose it's possible that bit 12 is being set unintentionally.

I made a simple plugin to get the value:

#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    RegConsoleCmd("sm_get_pre", Command_GetPRE, "Get the player resource entity index");
}

Action Command_GetPRE(int client, int args)
{
    ReplyToCommand(client, "Player resource entity index is %d", GetPlayerResourceEntity());
    
    return Plugin_Handled;
}

Server version information

version; plugin_print; meta version; meta list; sm version; sm exts list; sm plugins list

Build Label:           5394426   # Uniquely identifies each build
Network PatchVersion:  5394426   # Determines client and server compatibility
Protocol version:           24   # High level network protocol version
Server version:        5394426
Server AppID:           244310

Loaded plugins:
---------------------
0:      "Metamod:Source 1.11.0-dev+1148"
---------------------

 Metamod:Source Version Information
    Metamod:Source version 1.11.0-dev+1148
    Plugin interface version: 16:14
    SourceHook version: 5:5
    Loaded As: Valve Server Plugin
    Compiled on: Jun 26 2022 08:01:32
    Built from: https://github.com/alliedmodders/metamod-source/commit/4bdc218
    Build ID: 1148:4bdc218
    http://www.metamodsource.net/
	
Listing 8 plugins:
  [01] Stripper (1.2.2) by BAILOPAN
  [02] SourceMod (1.11.0.6916) by AlliedModders LLC
  [03] SteamWorks Extension (1.2.3) by Kyle Sanderson
  [04] SDK Hooks (1.11.0.6924) by AlliedModders LLC
  [05] SDK Tools (1.11.0.6924) by AlliedModders LLC
  [06] SourceTV Manager (1.2) by Peace-Maker
  [07] DHooks (1.11.0.6916) by AlliedModders LLC
  [08] SteamTools (0.10.0+54fdc51) by Asher "asherkin" Baker
  
 SourceMod Version Information:
    SourceMod Version: 1.11.0.6916
    SourcePawn Engine: 1.11.0.6916, jit-x86 (build 1.11.0.6916)
    SourcePawn API: v1 = 5, v2 = 16
    Compiled on: Oct 26 2022 20:36:44
    Built from: https://github.com/alliedmodders/sourcemod/commit/b5e029d9
    Build ID: 6916:b5e029d9
    http://www.sourcemod.net/
	
[SM] Displaying 16 extensions:
[01] Automatic Updater (1.11.0.6924): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6924): Extension for interacting with URLs
[03] Accelerator (2.5.0): SRCDS Crash Handler
[04] SteamWorks Extension (1.2.3): Exposes SteamWorks functions to Developers
[05] Regex (1.11.0.6924): Provides regex natives for plugins
[06] SDK Hooks (1.11.0.6924): Source SDK Hooks
[07] BinTools (1.11.0.6924): Low-level C/C++ Calling API
[08] SDK Tools (1.11.0.6924): Source SDK Tools
[09] SourceTV Manager (1.2): Interface to interact with the SourceTV server.
[10] Socket (3.0.1): Socket extension for SourceMod
[11] DHooks (1.11.0.6916): Dynamic Hooks
[12] Top Menus (1.11.0.6924): Creates sorted nested menus
[13] SteamTools (0.10.0+54fdc51): SteamWorks for SourceMod
[14] Client Preferences (1.11.0.6924): Saves client preference settings
[15] SQLite (1.11.0.6924): SQLite Driver
[16] MySQL-DBI (1.11.0.6924): MySQL driver implementation for DBI

[SM] Listing 44 plugins:
  01 <Failed> "Steph's AntiCheat [StAC]" (5.3.2) by https://sappho.io
  02 "Chat Filter" (0.4) by chundo
  03 "Source Chat Relay" (v2.1.5-2-gd81f03c) by Fishy
  04 <Error> "GameUI Crash Fix" (1.0.0) by GoD-Tony
  05 "SourceBans++: SourceSleuth" (1.6.4) by ecca, SourceBans++ Dev Team
  06 "SourceBans++: SourceComms" (1.6.4) by Alex, SourceBans++ Dev Team
  07 "SourceBans++: Main Plugin" (1.6.4) by SourceBans Development Team, SourceBans++ Dev Team
  08 "SourceBans++ Report Plugin" (1.6.4) by RumbleFrog, SourceBans++ Dev Team
  09 "SourceBans++: Bans Checker" (1.6.4) by psychonic, Ca$h Munny, SourceBans++ Dev Team
  10 "Discord API" (1.0) by .#Zipcore, Credits: Shavit, bara, ImACow and Phire
  11 "[DTK] Deathrun Toolkit" (0.4.1) by worMatty
  12 "TF2 Classic Tools" (1.0.1) by Scag
  13 "Tidy Chat" (0.5) by linux_lover
  14 "[Matty] TF2 Classic Enhancements" (0.1) by worMatty
  15 "[Matty] Sound Spray Advertiser" (0.22) by worMatty
  16 "[Matty] Entity Monitoring" (0.10) by worMatty
  17 "[Matty] Edict Overflow Diagnostic" (0.4) by worMatty
  18 "[Matty] Report" (0.2.2) by worMatty
  19 "[Matty] Mover" (0.23) by worMatty
  20 "[Matty] Adverts" (0.11) by worMatty
  21 "matty/get_pre.smx"
  22 "[Matty] Rotating Brush Angle Fixer" (0.3) by worMatty
  23 "Trigger" (1.1) by WhosAsking? (modified by worMatty)
  24 "Sound Commands" (1.11.0.6924) by AlliedModders LLC
  25 "Fun Commands" (1.11.0.6924) by AlliedModders LLC
  26 "Rock The Vote" (1.11.0.6924) by AlliedModders LLC
  27 "Basic Info Triggers" (1.11.0.6924) by AlliedModders LLC
  28 "Player Commands" (1.11.0.6924) by AlliedModders LLC
  29 "Fun Votes" (1.11.0.6924) by AlliedModders LLC
  30 "Anti-Flood" (1.11.0.6924) by AlliedModders LLC
  31 "Client Preferences" (1.11.0.6924) by AlliedModders LLC
  32 "MapChooser" (1.11.0.6924) by AlliedModders LLC
  33 "Basic Comm Control" (1.11.0.6924) by AlliedModders LLC
  34 "Admin File Reader" (1.11.0.6924) by AlliedModders LLC
  35 "Admin Menu" (1.11.0.6924) by AlliedModders LLC
  36 "Map Nominations" (1.11.0.6924) by AlliedModders LLC
  37 "Basic Chat" (1.11.0.6924) by AlliedModders LLC
  38 "Basic Votes" (1.11.0.6924) by AlliedModders LLC
  39 "Nextmap" (1.11.0.6924) by AlliedModders LLC
  40 "Basic Commands" (1.11.0.6924) by AlliedModders LLC
  41 "Admin Help" (1.11.0.6924) by AlliedModders LLC
  42 "Jailbreak Basic" (0.1) by worMatty
  43 "[DTK] QoL +use" (0.1) by worMatty
  44 "[DTK] QoL Train Control" (0.2) by worMatty
Errors:
stac.smx (Steph's AntiCheat [StAC]): Required extension "TF2 Tools" file("game.tf2.ext") not running
gameuifix.smx (GameUI Crash Fix): Error detected in plugin startup (see error logs)

Someone else on the TF2C Discord says they're having the same issue with OnTakeDamage().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.