Raised This Month: $51 Target: $400
 12% 

Showing results 1 to 10 of 10
Search took 0.00 seconds.
Search: Posts Made By: helloworlds
Forum: Scripting 11-26-2023, 07:10
Replies: 5
Views: 1,433
Posted By helloworlds
Re: A calculation problem with floats numbers

It has to do with the fact that float32 are represented as a sign bit, 8 bits for exponent, and 23 bits for the fraction, and you just can't represent all values accurately with this. For more info,...
Forum: Scripting 11-23-2023, 08:38
Replies: 5
Views: 1,433
Posted By helloworlds
Re: A calculation problem with floats numbers

There's probably some more elegant way to do this with arithmetic and/or bit fiddling, but here's one approach that takes advantage of the "FloatToString" function handling this case automagically....
Forum: Scripting 09-11-2023, 21:31
Replies: 2
Views: 947
Posted By helloworlds
Re: SDKCall with CPU register parameters

Thanks! It turned out in my case I could simply use SDKCall_Raw, and pass the "this" pointer address as my parameter (instead of some entity index), but the malloc trampoline trick pointed me in the...
Forum: Scripting 09-05-2023, 21:55
Replies: 2
Views: 947
Posted By helloworlds
SDKCall with CPU register parameters

I'm trying to call a C++ method from a class that doesn't derive from CBaseEntity/CBasePlayer, but since it's using Microsoft's thiscall convention, I'd presumably have to pass the "this" pointer in...
Forum: Scripting 05-21-2023, 12:59
Replies: 2
Views: 503
Posted By helloworlds
Re: Need help with methodmap please.

I'm not too familiar with methodmaps, but a lot of these object oriented things use some kind of notion of "self" as the implicit first argument. Try VFormat with the third argument, instead of...
Forum: Scripting 05-08-2023, 16:54
Replies: 4
Views: 999
Posted By helloworlds
Re: What is GameData, and how does it work?

This might be useful if you want to use Linux from Windows: https://learn.microsoft.com/en-us/windows/wsl/install (edit: although if you just want the Linux files, see Spirit_12's answer below,...
Forum: Scripting 05-08-2023, 07:02
Replies: 4
Views: 999
Posted By helloworlds
Re: What is GameData, and how does it work?

Put simply, GameData contains information that allows you to target the server memory directly. This can be useful for exposing functionality that isn't already available via SourceMod.

The...
Forum: General 11-08-2022, 04:55
Replies: 7
Views: 1,540
Posted By helloworlds
Re: SourcePawn compiler suggestion

Edit: answering my own question: there's a <testing> include in SourceMod I was completely unaware of that solves this.


AssertEq("Array size mismatch", sizeof(foo), sizeof(bar));


___________
Forum: Scripting 10-30-2022, 23:52
Replies: 1
Views: 414
Posted By helloworlds
Re: [L4D2]question about player join in game.

Is there some bug in specific you're trying to solve? Compile issue? I notice you're typoing TEAM_SPECTATOR as TEAM_SPEACTOR a few times in the code, although the compiler should probably catch this...
Forum: Scripting 10-30-2022, 03:07
Replies: 0
Views: 582
Posted By helloworlds
(SM 1.11) Storing function callbacks in DataPacks

Hi,

I'd like to be able to store a pointer of EntityOutput inside a DataPack in my plugin. We do this to interact with some dynamic entity I/O in the game level that may or may not exist,...
Showing results 1 to 10 of 10

 
Forum Jump

All times are GMT -4. The time now is 04:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode