![]() |
bot_sounds.cpp
there's 3 distinctive lines that's being used over n over
i was wondering if u put it into a method that gets called instead it would be neater code.. but will it slow\use more resources (ie memory\cpu)? |
Re: bot_sounds.cpp
yea but i think for 2 different if's it won't be called..
so i think he was trying to save cpu usage at the expense of the dll's size. |
Re: bot_sounds.cpp
...or he was just lazy and did a lot of CTRL-C CTRL-V :)
|
Re: bot_sounds.cpp
so the bot_sounds.cpp can be reduced file size alot by adding a method similar to this:
Code:
void SoundMethod(boolean a,float b, float c, boolean d) but will it be efficient?? |
Re: bot_sounds.cpp
actually it'll be very very very slightly less efficient but it'll save space in the dll...
at least thats what i think it'll do.. btw... more descriptive names... and I don't see iIndex or fVolume or pEdict or vecPosition defined anywhere in that scope... |
Re: bot_sounds.cpp
Quote:
|
Re: bot_sounds.cpp
hmm
I dunno of any way to teach you what a scope is but to show you... Code:
#include <iostream> |
Re: bot_sounds.cpp
ahhhh...u mean class.......sorry as i said i've only learnt a little java...and c\c++ is like going to lower langs..
basically this is a method thats within the bot_sounds.cpp if u have a look u'll see that these 5 lines are often used...so to save space one can replace the 3-5 lines with just 1 method call... i'll try do it and put it up.... |
Re: bot_sounds.cpp
I say we go and add more hearable sounds...
it seems to be like it's missing some useful sounds.. |
Re: bot_sounds.cpp
yep ur right ..knife hit's and stabs aint there... world spawn...
what other's do we need? |
All times are GMT +2. The time now is 06:59. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.