== MAPS ==

All maps were designed with GtkRadiant 1.5.0 and compiled with QBSP3 revision
1.09 (Geoffrey DeWan), QVIS revision 1.03 (Geoffrey DeWan) and ArghRad version
2.01 (Tim Wright).



== CODE ==

This is a quick overview of stuff that has been modified in the source code. I
don't think that's all there is but if you plan to look into it, this info
should give you a head start.

"gamex86.dll" has been compiled with Microsoft Visual Studio 2010 (I believe
it is still available for free and only requires a simple mail registration).
Some sections have been heavily modified; especially things related to the
pawn-o-matic, road book, Momo (the bouncer), and weapon cycling, while other
things were only slightly modified.


REWRITES

Momo code rewritten; what the player has done with Momo used to be preserved
in episode flags (player->client.pers.episodeflags), but is now stored in game
flags (game.serverflags - also where cross-level triggers are stored) instead
since these flags are reset in-between units. This choice frees three bits in
episodeflags and allows us to reuse the same code across all episodes. The new
code is in GenericMomo_Sight, GenericMomo_Check, GenericMomo_Process and
GenericMomo_Initialize. There's also a quick redirect in EP_CastSight,
EP_EventSpeech and EP_SpawnFlags to redirect to the new Momo functions instead
of branching in each episode separately. Also, the character can use a welcome
line with the "sounds" field (0 for skidrow, 17 for poisonville, 19 for
shipyard, 18 for steeltown, 20 for radiocity, or 21 for a generic welcome) and
"target2" can be used to set the door to unlock after giving him the money (by
default, it should be "bardoor_##" where ## is the episode: "sr", "pv", "sy",
"st", or "rc").

Road books were also rewritten so that the same code would be used by all
units, rather than copy/pasting entire sections with very minor changes.
EP_Flag_Newflag and EP_PlayerLog refer to log entries by pointer and redirects
toward the same routine. The shared routines are EP_Shared_Player_Log and
EP_Shared_Flash_Newflag. Three fields were added to client_persistant_t for
that purpose: log_unlockcount, log_unlockstale and an array of 32 bytes:
log_unlockorder. This allows us to know how many pages are unlocked, which one
have been read, and the order in which they should appear. In the original
game, pages would be sorted in the order of the log array for that episode
rather than the order in which hints are added in the road book. As a result,
the player_lot_t structure has been modified and only now requires a string
plus its associated episode flag (the last entry in the array must be NULL).

Pawn-o-matic has been almost entirely rewritten. One of the changes involves
PawnCycle, a replacement routine for PawnNext and PawnPrev found in g_cmds.c;
the rest is in g_pawn.c. One of the big changes is an array that represents
the shop. For each section, it contains all possible 8 slots. Each slots
provides a price for the item, the first line the shop keeper will say to
describe the item, the number of lines that exist for that item and finally
the item name. There's also another array that defines what items are
available in each shop, rather than the complex branching code Xatrix wrote to
validate a purchase.

The door unlocking mechanism in Cmd_Activate_f has been modified. Instead of
checking each key present in the inventory by pickup name, the code now takes
the value in the "key" field of the door and sees if a matching "key_key#" is
present in the inventory. It's cleaner and really helps with the creation of
new keys.


CONSOLE STUFF

Added console command "freezeworld", which stops all entities from being
updated, stopping them in their tracks. It's useful to take cool action shots.

Added console command "nomonster", which removes all characters from the map.
It's useful if you need to remake the navigation routes without having to deal
with characters getting in your way.

Added console variable "raindensity", which takes a decimal value between 0.00
and 2.00 (default is 1.00). If too many particles slow your computer down, you
may try to reduce that value and reload the map. If you want more, crank up
the value to 2.00.


ENTITIES

Added parameter "keys" to the "give" console command, which will give all
"key_key#" object (doesn't work with "give all"). Also, when asking for ammo,
a hard-cap has been put in place (you could go pass through the inventory
limit in the original game) and give cash has been modified (when asking for a
specific sum, the total amount of cash in your possession is replaced, instead
of incremented - that's how everything else works with the "give" command)

Added pistol accuracy mod in pawn-o-matics and created a proper pickup item
and icon for it. It's the all-purpose pistol mod with a "count" of 5.

Added flamethrower slowburn mod in pawn-o-matics and created a proper pickup
item and icon for it. It's the all-purpose pistol mod with a "count" of 6.

Acid shells have been added. Available in pawn-o-matics and they even have a
pickup model.

Two new keys have been added: key12 (cemetery key) and key13 (garage key).
Note: key11 is a special case where a door is unlocked by episode flags (go
figure).

New entity: target_epflag_execute. It's the equivalent of
target_crosslevel_target, but uses "player->client.pers.episodeflags" rather
than "game.serverflags". Now that I think about it, it wasn't necessary.

New entity: misc_model, target_epflag_register, target_epflag_execute,
target_showhelp, misc_model_cast, cast_stayput, props4_stool_push,
trigger_thunder, trigger_counter_cycle, trigger_switcharea.


MISC.

The ThrowDebris routine redirects toward a new routine called
ThrowDebrisScale, which allows us to adjust the size of the debris models.

Added acid shotgun mod. A new array has been added to client_persistant_t to
allow easier scrolling between weapons (weapon_rotation[]). It stores the item
index of the last weapon accessed on that slot. Internally, the acid mod is a
weapon of its own, only accessible if the shotgun is in the inventory. Keeping
track of which shotgun the player selected last allows us to skip weapons with
WeapCycle (replacement for WeapNext and WeapPrev) without seeing two shotguns.
It also allows the player to quickly switch back to whatever ammo was last
loaded in the shotgun. Some changes were made to "g_weapon.c" to process the
new shotgun shells (there's a redirect happening in fire_shotgun). The default
shotgun now uses Use_Weapon2 rather than Use_Weapon for switching.

Thanks to the new weapon cycling system, it is now possible to mount and
dismount the silencer for the pistol at will - the mounting animation doesn't
play if the silencer is assembled. Switching back to the normal pistol will
retrigger the mounting animation next time.

Two new fields in edict_s: frame_first and frame_last. These are used by
misc_model and misc_model_cast. This change required a slight modification of
the fields[] array in g_save.c

Added a check in SP_cast_dog so that if no skin is defined, the default "1" is
assigned.

When equipped with the silencer, the pistol would eject two shell casings per
shot. I removed one... what a silly thing to do.

A small quirk was fixed with the shotgun: if the shotgun could take more
shells than what was available in the inventory, an extra "reload" animation
would be displayed along with the reload sound.

New names have been added: Jeda (bartender), Cain (hired help), Abel (hired
help), Gideon (unused), Blake (a blind guy with two dogs in the bone yard and
woods), BadMonk (cameo character in the bar restrooms), Dale (cemetery bum).

There was a missing bit of code in ai_shorty.c (there was a missing move if
the character is equipped with the HMG - this move is present in ai_whore and
an_punk, so I assume they just forgot to copy/paste that code)

A new sound (value 11) has been added to doors, so they have a rusty old metal
gate sound instead.

elements_raincloud and elements_snowcloud have been slightly modified. For
one, they are non-solid rather than solid BSP (I don't know why they would set
these things to solid in the first place). Also, when their spawnflag is set
to 1, the value provided in "fxdensity" is the number of particles per 256x256
units (so clouds emit a number of particle proportional to their dimensions).
Both clouds are activated via a new routine called init_cloud_client, since
only a couple of lines are different from either initialization. This routine
is called when the client spawns in the map rather than when the entity is
loaded (because then, clouds would only spawn particles if the player entered
the server for the first time via loading a map or reloading a saved game).

New routines "generic_metal_debris" and "generic_sound_entity" replace various
copy/pasted code in g_joe_misc.c

Mag Slug and Trap were removed from the code. These were leftovers from Quake
II. Cell (another Quake II leftover) was renamed internally to 308cal (HMG
ammo).

Upon entering the server, if the player spawns in "sr1.bsp" or "kpcut1.bsp"
and the info_player_start has its "health" field set to anything, the player
will be given the value provided instead of the default 68 hit points of the
normal Kingpin campaign. It's a bit dirty, but that's the only I wouldn't
break compatibility with the original game.