Damage Modify Problem (Blue Raja)
Hello, I have been modifying a plugin (what else do I do) by Blue Raja recently because it sparked an idea I had many of years ago, balancing all those crappy never used guns in CS. When I get it working, I will input the commands and abilities to edit any guns through cvars, but right now, I have a problem:
For some reason (even though I took out all the specific admin targeted damage multipliers, it is still (i think) doubling the damage from each gun from every player. They are even stronger if they are a gun on the list below (multiplying from a multiplier). Can somebody point to the code that I missed to remove? I have been looking and tweaking for half an hour, and I can't see anything. NOTE TO BLUE RAJA: If you don't want me to release this plugin, just say so, but it would be nice if you could help me with this, for my server. Code:
|
Score!
I'm glad someone finally appreciates my f*cking work ^_^ But uh...two things: 1. Don't use that code; I'm going to make a complete rewrite of damagemod, so I don't have to give credit to someone else anymore (it's gotten to the point where all of the code except the function names and that big switch statement are mine)...that, plus I think I can optimize it. Also, it might take a while, since I'm still trying to make the kills commited by the plugin not look like suicides... I won't have time to work on it this week, either; finals are in four days O_o. 2. Check the beginning comments in my source again. *waits* This is because registering the message with register_event() doesn't stop the message from getting to the engine (I think, in fact, it catches the message after the server deals with it) - thus, the damage done by the plugin is damage done EXTRA to the player. If, for example, sv_highgunmult is 1, your code will change the damage variable to 1.6 if the player is using a TMP. That's 160% damage EXTRA done to the victim - a total of 260% damage. If I were you, I'd just rewrite it all. Either that, or wait until Raja can figure out how to use the damn death-camera O_o Otherwise, do what I was obviously implying and change the numbers to 0.x et cetera blah blah blah... Hope that helps. |
PS. I would prefer if you didn't release it until after I can make my changes to damagemod, to make it less shitty; but if you're insistant, I won't stop you. Just make sure to give credit where credit is due ^_^.
|
Quote:
Well I will try to rewrite my own, and then write my own faking the death messages based on your code. If that doesn't turn out, I will just wait for you :). PS- Thanks for positive response. |
You cant change the damage with a plugin. (Maybie with the fakemeta module, but not with register_message or register_event)
One of the problems is that the modules get information BEFORE the plugins. So if you use register_message() you will alter the message that the client sees, But the other modules(Or plugins loaded before yours) will no see the change. On another note you plugin will fail on servers that resurect players.(like DM mods,War3 and so on) |
Well I'm not sure if there's anything I can do about getting it to work with stats-module and other modules...I'll check it out later
However, I know I could fix the DM thing - just check is_user_alive on reset_hud message, and set DeathHandled[id] appropriately. I'll write that into my rewrite of damagemod; thanks, EKS ^_^ |
This may have been what BlueRaja was talking about improving, but wouldn't it be easier to use get_weaponname and strip the weapon_ prefix, instead of having a huge switch statement?
|
I was actually going to go one better and just create an array with all the names (which I'm assuming would be slightly faster; not that it really matters, as it's only evaluated on a player's death anyways...)
That switch statement was basically the only notable code left from WC3 mod, whose code I used as a base when I began this plugin. |
| All times are GMT -4. The time now is 19:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.