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

CS 1.3 style shooting help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aportner
Member
Join Date: Nov 2004
Old 11-17-2004 , 16:23   CS 1.3 style shooting help
Reply With Quote #1

I think I had an idea how to bring back 1.3 style shooting (i.e. having jumping pistol shots be accurate). Would it be possible to somehow hook or replace HL's CBaseEntity:FireBulletsPlayer function and change the spread vector to [0, 0, 0] for every call? I know this would completely remove recoil but it's definitely a start. I don't know enough about dll hooking and such to do it, but I have seen adminmod do something similar with CBaseEntity. if somebody could point me in the right direction it'd be much appreciated.

Also, has anyone figured out (either using setfov or some other method) how to remove the huge delay for the awp switching? I'm thinking if it's locked in client-side by a timer that it might be possible to just use amx to set the client's weapon model to the awp and have amx handle the zooming and shooting, which could then be extended to pretty much any weapon in the game.
aportner is offline
BAILOPAN
Join Date: Jan 2004
Old 11-17-2004 , 17:18  
Reply With Quote #2

It's very difficult (read: impossible) to properly hook CBase functions, unfortunately. I don't think Admin-Mod does too much with CBaseEntity. Also, you don't even know if CS uses a "FireBullets" function for firing.

The AWP, I'm sure, is locked client side and most likely it's impossible to fix this.
__________________
egg
BAILOPAN is offline
aportner
Member
Join Date: Nov 2004
Old 11-17-2004 , 19:24  
Reply With Quote #3

for the awp, would there be a way then to force the client to shoot via an amx plugin even before that timer is up? I know you can make someone zoom using prethink, but I don't know if you can make them fire.

also I'm pretty sure HL uses prethink because if you install CS 1.3 for steam, the client still thinks you can't accurately shoot mid-air. and isn't it possible since CBaseEntity::FireBullets isn't virtual just to grab the function pointer out of each CBaseEntity object and replace it? Or would it be possible to create a class that extends CBaseEntity with a virtual FireBullets function and somehow replace the objects during a call?

or, even better, would it be possible to intercept an attack command via prethink and re-route it to that entity's firebullets command, play a firing animation, and return handled?
aportner is offline
aportner
Member
Join Date: Nov 2004
Old 11-17-2004 , 20:16  
Reply With Quote #4

Okay, looking through the HLSDK I found two variables in CBasePlayerWeapon called "m_flNextPrimaryAttack" and "m_flNextSecondaryAttack", which is used to determine when the client can attack next. Would it be possible to via a module or plugin modify this variable for an entity so that they can attack sooner?

It looks like you can somehow go
Code:
Player *p = some player;
((CBasePlayerWeapon *)p->m_pClientActiveItem->GetWeaponPtr())->m_flNextPrimaryAttack = -1;
aportner is offline
BAILOPAN
Join Date: Jan 2004
Old 11-17-2004 , 20:32  
Reply With Quote #5

You can't just modify CBase variables. You don't know how the mod chooses to implement them. At best you can go around hacking memory, but this requires time, patience, and much testing.
__________________
egg
BAILOPAN is offline
aportner
Member
Join Date: Nov 2004
Old 11-17-2004 , 20:45  
Reply With Quote #6

what exactly does calling metamod's int mm_GetWeaponData(struct edict_s *player, struct weapon_data_s *info) function give you back? I can't find information on the weapon_data_s struct, so I assume it's mod dependent?
aportner is offline
BAILOPAN
Join Date: Jan 2004
Old 11-17-2004 , 20:54  
Reply With Quote #7

the actual struct is not mod dependent, but how a mod uses it probably is.

I'm not a big modder so most of the SDK is a mystery to me. I just know a little bit about CBase hacking.
__________________
egg
BAILOPAN is offline
aportner
Member
Join Date: Nov 2004
Old 11-17-2004 , 20:57  
Reply With Quote #8

ok I found it in weaponinfo.h, and it has the next attack information in there. would there be a way to call metamod's getweapon function and modify that variable?
aportner 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 20:34.


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