AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Dod Mortar Class (https://forums.alliedmods.net/showthread.php?t=44376)

Wilson [29th ID] 09-03-2006 20:42

Dod Mortar Class
 
1 Attachment(s)
UPDATED TO v1.11 -- 03 SEP 2006
UPDATED TO v1.1 -- 30 AUG 2006

Here it is gentlemen, the "Mortar Class" you've seen in map screenshots where the compile is buggy, or the models you've seen in the GCF. This plugin includes the model and the class name and I've coded the rest of it.

Code:

////////////////////////////////////////////
//  Day of Defeat Mortar Class
//  Created by: 29th ID
//
//  Part of the 29th ID's modification to
//  Day of Defeat, making it more realistic
//  DOD:Realism - dodrealism.branzone.com
//
//  Credits:
//  Code for the mortar shell itself was
//  based off of Ludwig Van's "Missile"
//  plugin. He also helped answer a few of
//  my general coding questions so credits
//  to him.
//
//  The 29th ID Engineer Corps were the
//  plugin's main testers and helped
//  immensely.
//
//  Versions:
//
//  1.0 - Initial Release - 24 JUL 2006
//  1.1 - Basic Bug Fixes - 30 AUG 2006
//  1.11- Overlooked Bugs Fixes - 03 SEP 2006
//
//
//  Known Bugs: (Not sure how to fix)
//  -Player model displays inside of player
//    instead of in "holding" position
//  -World model is a bazooka/pschreck
//  -Switching to pistol plays "reload"
//    animation/sound for a second (client-only)
//
////////////////////////////////////////////

Code:

////////////////////////////////////////////
//  Description
//
//  This allows a player to use the mortar
//  class in Day of Defeat, the class that
//  the developer team never completed but
//  still made the class name and the view
//  model.
//
//  You can change your class to the mortar/
//  morserschutze and prone & deploy it.
//  You can then adjust the power of the
//  mortar and fire it over buildings to land
//  on targets designated by firemarkers.
//
////////////////////////////////////////////

Code:

////////////////////////////////////////////
//  Usage (cvars for amxx.cfg):
//
//  dod_mortars <1/0>
//          Enables or disables the plugin. (Default 1)
//  dod_mortar_damradius <amount>
//          Radius mortar can cause damage from where
//          it lands. (Default 550)
//  dod_mortar_maxdamage <amount>
//        Maximum hp damage caused by a player being
//        hit with a mortar shell. (Default 180)
//  dod_mortar_defaultpower <amount>
//        Default setting for the power of the mortar,
//        which has to do with the speed/distance the
//          shell travels. (Default 700)
//  dod_mortar_ammo <amount>
//        Amount of mortar shells the client spawns
//        with. (Default 30)
//  dod_proned_decrease <amount>
//        Amount to decrease the damage if the mortar
//          hits a client who is proned (Default 35)
//  dod_crouched_decrease <amount>
//        Amount to decrease the damage if the mortar
//        hits a client who is crouched (Default 10)
//  mp_limitalliesmortar <amount>
//  mp_limitaxismortar <amount>
//  mp_limitbritmortar <amount>
//        Works the same way as other class limits, to
//        limit how many players are allowed to use the
//        mortar on each team
//
//  Usage (client commands):
//
//  say /mortar
//        Brings up MOTD window with the following client
//        commands & instruction
//  class_mortar
//        Sets the users class to the mortar class. Must
//        respawn just like any other class.
//  mortar_deploy
//        Deploys the mortar and makes it ready to fire.
//        +attack2 will not do this.
//  mortar_up
//        Increases the power of the mortar by 100
//  mortar_down
//        Decreases the power of the mortar by 100
/////////////////////////////////////////////

Code:

////////////////////////////////////////////
//  Updates
//  v.1.1
//  Thanks to 29th ID, Diamond-Optic, and
//  =|[76AD]|= TatsuSaisei for finding bugs
//
//  -Fixed error messages when spectating mortar player
//  -Made death messages pending on mp_deathmsg
//  -Added class limits
//  -Switching weapons while deployed now undeploys
//  -Mortar kills now log as a mortar (instead of missile)
//  -Fixed bug with non-mortar classes getting ammo
//  -Fixed bazooka-drop-run bug
//
//  v1.11
//  -Fixed kills logging double
//  -Fixed class limits not recognising "-1"
////////////////////////////////////////////

Please PM me or reply here with any bugs so I can fix them. This is the initial release so hopefully it will workout well and will be fun to use.



Support for this plugin at
http://www.dodplugins.net/forums/showthread.php?t=110

SweatyBanana 09-03-2006 23:30

Re: Dod Mortar Class
 
You do not have to attach the .amxx file.

Wilson [29th ID] 09-04-2006 03:08

Re: Dod Mortar Class
 
*takes his .amxx file back*

Xanimos 09-08-2006 12:46

Re: Dod Mortar Class
 
What I would like to see changed in this is:
1) Use pcvars instead of cvars
2) Either use all FM or all Engine but not both.
--I know in the past (If you have been scripting that long) that message_begin and all those functions were in engine but now they arent so it seems right to use all FM(preferably) or all engine. Both is a waiste of resource.

But it is good to see more DOD plugins out. So if you could atleast consider these changes i will consider approving this.

Wilson [29th ID] 09-09-2006 23:24

Re: Dod Mortar Class
 
Xanimos, thank you for your suggestions. I've only been doing PAWN scripting for about 2 months now, so that's why both APIs are being used. I'm learning quickly but there are a few tricks of the trade you simply must learn from experience :-P

By the way, what's the difference between a pcvar and cvar now that you've brought it up?

Implementing fakemeta instead of engine should be easy I'll work on that.

s p l i t 09-09-2006 23:34

Re: Dod Mortar Class
 
pcvars are more optimized

diamond-optic 09-10-2006 12:16

Re: Dod Mortar Class
 
if you need any help with converting over the engine stuff.. just ask away :-)

Xanimos 09-10-2006 13:08

Re: Dod Mortar Class
 
Best place to ask for help with any of these changes, I would say that switching engine to FM would be most difficult. You should ask in Scripting Help.

And yes as s p l i t started, pcvars are more optimized and faster because you store the cvar pointer (hence pcvar) for the navtive to use instead of it having to look up the cvar from the string name and then set it. This just straight sets it. As you can tell from that it is much faster.

headshotspy 12-13-2007 21:32

Re: Dod Mortar Class
 
I dont know if these things are fixed yet if so i would love to get this plugin but sounds like it has erros or is it good to go??

Wilson [29th ID] 12-15-2007 08:56

Re: Dod Mortar Class
 
This plugin works fine. The only issues are cosmetic.


All times are GMT -4. The time now is 04:09.

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