]> code.citadel.org Git - citadel.git/commitdiff
* schtuff
authorArt Cancro <ajc@citadel.org>
Mon, 5 Feb 2001 02:53:14 +0000 (02:53 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 5 Feb 2001 02:53:14 +0000 (02:53 +0000)
citadel/room_ops.c

index 0367122f8a543f9eab0486a1cdd5774841639aea..8825e35087480dac5bcbee4e65e935cf224bcf0b 100644 (file)
@@ -286,6 +286,15 @@ void lgetfloor(struct floor *flbuf, int floor_num)
  * This is strictly a performance hack.
  */
 struct floor *cgetfloor(int floor_num) {
+       static int initialized = 0;
+       int i;
+
+       if (!initialized) {
+               for (i=0; i<MAXFLOORS; ++i) {
+                       floorcache[floor_num] = NULL;
+               }
+       initialized = 1;
+       }
        
        if (floorcache[floor_num] == NULL) {
                floorcache[floor_num] = mallok(sizeof(struct floor));