King of the Streets Source Code

I'm going to keep this really short and to the point. Here is all the source code I used for the game. As you can see, there are two directories, one is Source and one is Unused. Anything in the Unused directory was code that I ripped out from the single-player game that wasn't being used for multi-play. Everything in the Source directory is being used completely.

I only added two new files of my own, g_scrollmenu.c and kots_misc.c. The scrollmenu has my menu code and some other teamplay stuff, the misc file has some misc entities that were pulled from joe_misc.c.

I still have to get into the habit of commenting code, so my comments are pretty sparse but everything should be plenty readable. The few comments I did add have //+AS in front of them (I hope).

As of the last compile, all the known bugs should be fixed. The player tagging was messed up because the Kingpin engine was using the player skins to identify same teams (I would have thought it was using the ent->client->pers.team value but that would have been too easy). AI for dealers should attack any enemy living player soon as they are in ClearSight(). Also fixed the AI spawning, originally I had the think function check for a respawn (sloppy hack) until I realized I can access bots like clients and then I respawned them in RestartRound(). The ScrollMenu code had an update in ClientEndServerFrame that I believe was causing the Datagram errors, now the menu is only sent on keypresses, although slower ping clients might still have problems if they hit the keys too fast. The only thing I haven't had a chance to fully debug was the AI Cast Memory feature, found in ai_memory.c. Tried ripping it out but its so woven into the code I saved it for last.

Well that should do it, Here's a fairly stable headstart at something new for all of you. The nice part about all the code here is since the single player stuff was removed (about half the code), there's less crap to clutter things up. Enjoy!

Merc[AS]