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

Always-Usable Impulse


Post New Thread Reply   
 
Thread Tools Display Modes
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-29-2016 , 13:17   Re: Always-Usable Impulse
Reply With Quote #11

I can't just use get_ent_data_entity() like that, because I want to support both 1.8.3 and previous versions.

Anyway, I updated the code and tested it on Windows listen server with AMXX 1.8.3 and Linux dedicated server with AMXX 1.8.2 (both CS 1.6). Worked flawlessly.

1.8.2 version is a bit more hardcoded though, but I made sure to support multiple games. It contains such data (copied from AMXX 1.8.3 gamedata files):
PHP Code:
new const g_SupportedMods[][modinfo_t] = {
    {
"cstrike"1408},
    {
"czero"1408},
    {
"dod"1440},
    {
"valve"1148},
    {
"tfc"2196},
    {
"gearbox"1200}
}; 
so adding more games is easy.
Should that data be read from a text file or is this good enough? Some thoughts on that please.
klippy is offline
ujjl
Senior Member
Join Date: Jul 2009
Location: Hungary
Old 01-29-2016 , 13:35   Re: Always-Usable Impulse
Reply With Quote #12

Quote:
Originally Posted by KliPPy View Post
I can't just use get_ent_data_entity() like that, because I want to support both 1.8.3 and previous versions.
The logic is the same: skip this branch
https://github.com/ValveSoftware/hal...ayer.cpp#L1504
by setting tank to NULL
PHP Code:
public Player_PostThink_Post(this) {
    if(!
g_hasExecuted[this]) {
        static 
oldTankoldTank get_pdata_ent(thism_pTank);
        
set_pdata_ent(thism_pTank0); //This will skip the tank re-use when controlling tank
        
ExecuteHamB(Ham_Player_ImpulseCommandsthis);
        
set_pdata_ent(thism_pTankoldTank); //Everything back to normal
    
}

Quote:
Originally Posted by KliPPy View Post
Should that data be read from a text file or is this good enough? Some thoughts on that please.
I think who needs to add new offset there, will understand where to modify the script. Who do not need new offset will just be confused with extra text file.
__________________
- blupi blupi

Last edited by ujjl; 01-29-2016 at 13:43.
ujjl is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-29-2016 , 14:17   Re: Always-Usable Impulse
Reply With Quote #13

My intention was to make ImpulseCommands() called every frame, even if the game decides it shouldn't be. I made what I wanted, and I am happy with it. In my opinion, the first version was all good anyway, but I made it take tanks into account.

Last edited by klippy; 01-29-2016 at 14:18.
klippy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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