Mobile MG42

This mod allows players to pick up and move MG42s. It is a server-side mod and includes game type files for all the stock gametypes....

Download

Uploading...
Do not refresh or leave this page!

File Description

This mod allows players to pick up and move MG42s. It is a server-side mod and includes game type files for all the stock gametypes. At the end of this readme are instructions for installing the required code into your gametype files.

There is no animation or model used while moving the MG42--the player is visually indistinguishable from a normal player. There is no slow down. The only limit is that a player can carry at most one MG42 at a time

What a great mod! Grab it now and stick it on your servers :rock:

Read More

Download 'mobilemg42.zip' (73KB)

Readme
Mobile MG42 Mod
by RedMercury (Rdm)

Release 1.0
June 9, 2004

Contact:
pm RedMercury on www.iwnation.com's forums.
Also, see thread in iwnation's scripts and ssm forum
-------------

To install, copy the pk3 into your Call of Duty\Main folder. If there are other mods there, results are
unpredictable. Note this is a server-side mod. Clients do not need to have it.

-------------

This mod allows players to pick up and move MG42s. It is a server-side mod and includes game type files
for all the stock gametypes. At the end of this readme are instructions for installing the required code
into your gametype files.

There is no animation or model used while moving the MG42--the player is visually indistinguishable from 
a normal player. There is no slow down. The only limit is that a player can carry at most one MG42 at a time.

Procedure for picking up an MG42: get close enough so that you are touching it. Then you will see a text
message on the lower left side of your screen telling you to pick up the MG42 by holding your melee button.
Hold your melee button (pressing briefly may not register) to pick up the MG42.

While you are carrying the MG42, there will be an indicator on the right side of your screen.

You may drop the MG42 at any suitable location. A suitable location is a location that can support the
bipod. An unsuitable location is one where the MG42 would be sticking through an object, such as a tree or wall.
Beware that the stance you are in matters. For example, you can almost always place MG42 on flat ground if you
are prone, but to place an MG42 while standing or crouching, you need appropriate terrain in front of you
(e.g. a box, a windowsill, a barrel). If you are in a suitable location, text will appear in the lower left side
of your screen telling you that you can place the MG42 by holding your melee button.

If you place a MG in a small window which would be too small to look through when using the MG, the MG will
automatically be placed lower, "without a bipod" (try it on the bunker ports on mp_rocket).

If you die while carrying an MG42, it will be dropped at your feet. If you die because of a minefield, the
MG42 will reset to one of original locations. Which particular location is decided randomly if no other mgs
are on the map, or arbitrarily (first available original position) if there are other mgs on the map.

There is a cvar, sv_min_mg42, which can be used to place MG42s on maps. This is the minimum number of MG42s
any map will have. If a map has fewer (perhaps 0) MG42s than this number, additional MG42s will be spawned
to reach this minimum. The spawning procedure is this: For RE and SD games, their spawn points are used. If
spawn points for those are not found or the game type is any other game type, random TDM spawn locations are used. 
If S&D or RE spawn locations exist, MG42s are spawned alternatively between allies and axis. Which side gets
the first additional MG42 is decided by the map. For stock maps with no MG42s, axis get the first additional
one (e.g. pavlov stalingrad harbor depot chateau powcamp ship). For stock maps with MG42s in positions that 
favor axis, allies get the first additional one (e.g. brecourt carentan hurtgen railyard rocket neuville).
For all other maps, including custom maps, the side that gets the first additional MG is randomly decided 
at the beginning of each round. The default value of sv_min_mg42 is 1.

-------------

Version history:

- 1.0 Initial release

-------------
To incorporate the functionality into your gametype, you must do the following:

1. Add this lines to Callback_StartGameType() after "maps\mp\gametypes\_teams::scoreboard();"

mobilemg42\_mobileMG42::Precache();

And this line before "thread startgame()"

mobilemg42\_mobileMG42::RememberMapMGs();

Especially for RE and SD, this line must be added before
"thread startGame()" and outside the if block of "!isDefined(game["gamestarted"])"

2. Add this line to the end of spawnPlayer():

self thread mobilemg42\_mobileMG42::WeaponPlacementThread();

3. Add this line to the beginning of callback_playerKilled(...) and callback_playerdisconnect()

mobilemg42\_mobileMG42::DropMG42();

4. For S&D and RE gametypes, add this to beginning of startRound():

mobilemg42\_mobileMG42::ResetMapMGs();

5. Add this line to maps\mp\_minefields.gsc in minefield_kill(...) right after radiusDamage(...):

mobilemg42\_mobileMG42::CheckMinefieldDeath();

-------------
Included in the code are commented out lines that would allow the same functionality with PTRS41. Just follow
the same pattern.

Feel free to copy and use any code in this mod. This mod and its code are for the entire community.
But give credit, please :)

Acknowledgements:
Bell, for helping me debug

Read More

Comments on this File

There are no comments yet. Be the first!

RedMercury


50 XP


Registered 11th June 2004

1 Files Uploaded

Share This File
Embed File