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

Code replacement


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Suki1997
Junior Member
Join Date: Mar 2018
Old 03-16-2018 , 19:10   Code replacement
Reply With Quote #1

Is there any replacement for this, to have a same function but diff less valuable code?

public fw_updateclientdata(id, sw, cd_handle)
{
//this function overrides the client side sounds and stuff
if (user_has_pbgun(id) && cd_handle)
{

set_cd(cd_handle, CD_ID, 1);
get_cd(cd_handle, CD_flNextAttack, nextattack[id]);

return FMRES_HANDLED;

}
return FMRES_IGNORED;
}

I removed all high price codes in Pb, but i cant find better replacement for this one here, do you guys know some function that does the same, just way better and less memory usage?
Suki1997 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-17-2018 , 07:11   Re: Code replacement
Reply With Quote #2

Follow the link in my signature.
__________________
Black Rose is offline
Suki1997
Junior Member
Join Date: Mar 2018
Old 03-17-2018 , 07:15   Re: Code replacement
Reply With Quote #3

I found solution for Y, and just now i found solution for X, there is always solution i just forgot where to look first..
Suki1997 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-17-2018 , 07:23   Re: Code replacement
Reply With Quote #4

I don't even see the problem with the code as is.
You say it's wasteful of memory, all I see is one global variable worth 128B.
So unless you start giving some reasons why this code wouldn't be good nobody will waste their FREE time.

You are telling us that you want code to replace other code with. But you haven't even told us what the code should do. This is the XY-problem and it cannot be solved unless you tell us X.
__________________

Last edited by Black Rose; 03-17-2018 at 07:27.
Black Rose is offline
Suki1997
Junior Member
Join Date: Mar 2018
Old 03-17-2018 , 07:32   Re: Code replacement
Reply With Quote #5

This sets client side for sound of shooting gun, thats a waste of memory and tottaly usseles, and there is no replacement, i tho there is, you can easily erase it, but in each model that you put on server, you gotta set in models sequences sound path.. do you understand better now?
Suki1997 is offline
Reply


Thread Tools
Display Modes

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 11:45.


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