Code leftovers

Introduction


Kingpin's code is full of spawnable entities that just don't work, crash, seems to do nothing at all or skip its initialization to use another bit of existing code instead (aliases and backward compatibility stuff), there are also a few bits of code never linked to any classname ("props_motorcycle_run" and "misc_rosie" for instance, are coded but cannot be spawned -- I can easily believe there are more like theses) and functional leftovers that are never used (see "Quake II leftovers" for some cool working stuff or entities that could easily be fixed).

To make sure I'm not totally mistaken (and for the sake of archiving), the list also include the reason why those entity seems unusable (quite honestly, I have the feeling that func_subdoor_base could be implemented in a map, but I never managed to make it work correctly).

Broken/test code


Most of the entities here are not fully implemented, referes to inexisting files or is obviously set for testing. I'd advise you not to use them.

Classname,Description
ai_combat_spot When searching in the whole code for "ai_combat_spot", only two results are found: g_spawn.c (three occurences: two for the actual routine name 'SP_ai_combat_spot' and one for the entity classname) and g_ai_ents.c (one occurence for the actual routine name 'SP_ai_combat_spot'). When spawned, the entity's size is set and dropped to the floor like every other AI-related entity (in deathmatch, the entity is removed). There's no other reference to this entity anywhere else and the code itself doesn't trigger anything, so I expect this entity to be unusable (even though it is present in three maps: pv_1, ty3 and ty4.)
ai_ty_mo_boundry This is a standard solid trigger. On touch, the entity check if the activator is the player. If not, the processing is aborded. If it is, nothing happen because the routine contains nothing else. There's no other reference to this entity anywhere else in the game source code. The entity is never used in any map.
cast_buma Loads "models/actors/bum_seg/parta.mdx" (missing, head), "models/actors/bum_seg/partb.mdx" (missing, body), set health to 100, before gibbing strength to 40 and mass to 100 -- the entity then cycles through frame 0 to 17, emitting "actors/bum/bum.wav" every now and then (might also switch to another routine where going through 0 to 74 before going back to main loop). Death event doesn't seems to be handled so I expect the game to crash when character is killed (or the guy cannot die at all).
cast_bumb Initialization is the exact same as cast_buma. During its life time, the entity is supposed to go through frame 0 to 218, then reinitialize to frame 75 and start another cycle till 117 (then, like cast_buma, might emitt "actors/bum/bum.wav" and get back to previous loop), death event doesn't seems to be handled so I expect the game to crash when character is killed (or the guy cannot die at all).
cast_punk_window Loads "models/actors/fidelC/tris.md2" (missing), set health to 1. While idle, the entity cycles through frames 0 to 211. When triggered, "actors/specific/spec3.wav" is played but nothing else happen. The actor must die in order to trigger the rest of the animation (frames 322 to 336). I expect a trigger_hurt was to be summoned upon this guy -- I also expect the window to be a mdx model as the routine seems to have a pointer for its indexing... but I'm not sure.
elps Loads "models/actors/elps_seg/up.mdx" (missing, head), "models/actors/elps_seg/fwd.mdx" (missing, body), "models/actors/elps_seg/rt.mdx" (missing, legs), "models/actors/elps_seg/diag.mdx" (missing, gun). On initialization, health is set to 1000, then the entity starts rotating by 3 degrees. Said to be a test entity for mdx bbox hit.
func_subdoor_base A complex rotating door working in 'team' with func_subdoor_handle1 and func_subdoor_handle2, should very likely be a sub-mariner kinda door although I never managed to make it work correcly (it remains unused in Kingpin). This entity is the main door and should be set like func_door_rotating.
func_subdoor_handle1 Part of a complex func_subdoor_base door. On initialization, the entity's 'handleflag' is set to '1' and nothing else happen. This entity seems to be called from another func_door_rotating routine (also used by func_subdoor_base) because of the 'handleflag'. I think this entity is bound to func_subdoor_base correctly. (see above).
func_subdoor_handle2 Part of a complex func_subdoor_base door. On initialization, the entity's 'handle2flag' is set to '1' and nothing else happen. This classname is called by two routines: door_go_down and door_go_up (for special rotations around the X or Y axis), nowhere else (see above).
misc_barry_bitch Loads "models/actors/bitch/head.mdx" (head), "models/actors/bitch/body.mdx" (body), "models/actors/bitch/legs.mdx" (leg). The entity then cycles through frame 0 to 761 while the current frame number is shown in the console.
misc_corky_fidel_mdx_pcx Loads "models/actors/thug/head.mdx" (head), "models/actors/thug/body.mdx" (body), "models/actors/thug/legs.mdx" (legs). The entity do nothing at all and just stand still.
misc_corky_fidel_mdx_tga Loads "models/actors/fidel_tga/head.mdx" (missing, head), "models/actors/fidel_tga/upper_body.mdx" (missing, body), "models/actors/fidel_tga/lower_body.mdx" (missing, legs). The entity do nothing at all and just stand still.
func_object_repair Changes its classname to 'object_repair' on initialization, set health to 100, defines default 'delay' value to '1', set solid bsp box without model. When idle, emmit sparks every 'delay' seconds (the death event is 'handled' there and not during initilization like it should). On death, all 'target' entities are triggered and the entity heal itself to 100 health points ever 'delay' seconds while emitting more sparks... I have no idea what it was meant to be.
item_jetpack Loads "models/items/misc/jetpack/jetpack.mdx" (missing), the item itself is coded but the functional code is not totally implemented.
refl Loads "models/vehicles/car/viper/tris.md2" (missing), the entity just spawns with a RF_REFL_MAP render flag.
rotating_light Loads "models/objects/light/tris.md2" (missing). Beside that, should work.
misc_amb4 Loads "world/amb4.wav" (missing). Beside that, should work.
misc_car Loads "models/vehicles/cars/viper/tris.md2" (missing). Beside that, should work.
misc_cut_scene This entity can be used, but won't be spawned.
misc_fidela Loads "models/actors/fidel_mdx/head.mdx" (missing, head), "models/actors/fidel_mdx/upper_body.mdx" (missing, body), "models/actors/fidel_mdx/lower_body.mdx" (missing, legs), cycles through frames 0 to 54.
misc_skidrow_radio_repeaterThis entity can be spawned even though the code contain nothing special. But there's no references to this classname anywhere else in the code. Unused in Kingpin.
misc_smoke Loads "sprites/s_smoke4.sp2" (missing), Kingpin do not support .SP2 anymore, supposed to be a smoke effect.
misc_pv_afraid The entity is correctly initialized and spawn properly. However, there's no reference to this entity anywhere except it's never referenced anywhere but in the spawning routines themselves. So no one ever runs to that entity.
sfx_beacon Never used in Kingpin, represent a rotating lighthouse's light beam, but it looks quite dirty in my opinion.
viewthing Loads "models/objects/banner/tris.md2" (missing). When idle, cycles through frames 0 to 7.

Backward compatibility aliases


When those classnames appear in a map, g_spawn.c usually refert to another entity's code to handle them. In some case, a custom initialization is wrote but a few lines later in the code, it switches to another entity's initialization or handling routine. I'd advise you not to use them.

Classname, Description
cast_punk2 G_spawn.c bind this classname to the same code as cast_thug (no specific code) said to be there for backward compatibility althrough it's never used in any map.
cast_rosie G_spawn.c bind this classname to the same code as cast_bitch (no specific code) said to be there for backward compatibility althrough it's never used in any map.
misc_explobox This entity has its own initialization code but switch to props_trashcanA's initialization on the first line, never used in any map.
misc_grunt G_spawn.c bind this classname to the same code as cast_thug (no specific code) said to be there for backward compatibility althrough it's never used in any map.

Quake II leftovers


Because the game source of Kingpin is based upon Quake II game source, there are still a few bits of code iD Software wrote for Quake II. Note that some of these entities weren't used in Quake II and are still not used in Kingpin.

Classname, Description
func_clock This is a particularly difficult entity to use and must interact with target_string and target_character. Unfortunately, while it was usable (and used) in Quake II, this entity is broken in Kingpin because target_character requires specific texture filenames and format Kingpin do no longer support (.WAL)
target_blaster Loads "weapons/laser2.wav" (missing), "misc/lasfly.wave" (missing) and "models/objects/laser/tris.md2" (missing). Beside that, it should work.
target_character Useless by itself, must be part of a more complex structure involving target_string. Used in Quake II but unusable in Kingpin (see func_clock).
target_earthquake Loads "world/quake.wav" (missing). Unused in Kingpin but works.
target_goal Unused in Kingpin, could work (although useless).
target_laser Unused in Kingpin but works.
target_lightramp Unused in Kingpin but works.
target_mal_laser Unused in Kingpin but works.
target_secret Unused in Kingpin, could work (although useless).
target_spawner Unused in Kingpin but works.
target_string Useless by itself, must be part of a more complex structure involving target_character. Used in Quake II but unusable in Kingpin (see target_character).
target_temp_entity Unused in Kingpin, could work.
trigger_gravity Unused in Quake II and Kingpin, could work.
trigger_key Unused in Kingpin but seems pretty reliable to me.
trigger_monsterjump Unused in Kingpin, could work.
func_conveyor Unused in Quake II and Kingpin but seems pretty reliable to me.
func_door_secret These are standard sliding doors with an intermediary move, unused in Kingpin but it seems pretty reliable to me.
func_lift Unused in Kingpin but 100% functional.
func_object Unused in Kingpin but seems pretty reliable to me.
item_health Loads "models/items/healing/medium/tris.md2" (missing) and "items/n_health.wav" (missing). Beside that, it should work.
item_health_large Loads "models/items/healing/large/tris.md2" (missing) and "items/l_health.wav" (missing). Beside that, it should work.
item_health_mega Loads "models/items/mega_h/tris.md2" (missing) and "items/m_health.wav" (missing). Beside that, it should work.
item_health_small Loads "models/items/healing/stimpack/tris.md2" (missing) and "items/s_health.wav" (missing). Beside that, it should work.
misc_gib_arm Loads "models/objets/gibs/arm/tris.md2" (missing). Beside that, it should work.
misc_gib_leg Loads "models/objets/gibs/leg/tris.md2" (missing). Beside that, it should work.
misc_gib_head Loads "models/objets/gibs/head/tris.md2" (missing). Beside that, it should work.