Zero Length Strings

AKA the Killtarget bug. This one came up during Map Jam 7, and it’s a bug which affects classic Quake and Quoth alike (note to future readers, if Quoth is past version 2.2 then this is no longer the case…). It manifests itself when a rogue entity deletes everything on the map without a targetname – including the player! This is obviously a showstopper, but to understand why it happens we need to explore a subtle detail of the QuakeC language.
Continue reading

Missing items and the restart command

Quake doesn’t give mappers direct control over the items a player starts with. If you want the player to have a nailgun from the moment the level starts, overlapping the weapon with the spawn point seems like a good idea. Most of the time the player picks up the weapon immediately and all is well, but a bug occurs if the player uses the restart command to load the level from the beginning – the item falls out of the level! This article takes a brief look at why, and then suggests how to modify the QuakeC code to work around it. Continue reading

Eternal sunshine of the spotless .think

In the springtime of startframe a virgin entity is spawned with nothing upon its mind, a blank slate upon which anything can be drawn. Consider

void(entity e) select_song =
{
   if(!e.think)
      bprint("Innocence");
   else
      bprint("Experience");
}

When this function is called with an utterly untouched entity it cries out “Innocence”. If we give this entity a function to think, we may later put an end to the thinking by turning to SUB_Null, which performs the task well enough. But like the apple from the Tree of Knowledge, an Original Sin has taken hold and the think will never be pure and clean again; select_song will evermore echo “Experience” for this entity. Continue reading