All pastes #469458 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-03 19:21 UTC
rendered paste body
Index: src/client/cl_hospital.c
===================================================================
--- src/client/cl_hospital.c    (revision 8157)
+++ src/client/cl_hospital.c    (working copy)
@@ -590,19 +590,20 @@
  */
 extern qboolean HOS_Load (sizebuf_t *sb, void* data)
 {
-       int i, baseID, type;
+       int i, baseID, typei, count;
+       employee_t *employee;
+       base_t *base;

        /* version 2.1.1 had some data stored here */
        if (*(int*)data == 1) { /* 2.1.1 */
-#if 0
-               employeesInHospitalListCount = MSG_ReadShort(sb);
-
-               for (i = 0; i < employeesInHospitalListCount; i++) {
+               count = MSG_ReadShort(sb);
+               for (i = 0; i < count; i++) {
                        baseID = MSG_ReadByte(sb);
                        type = MSG_ReadByte(sb);
-                       employeesInHospitalList[i] = &(gd.employees[type][MSG_ReadShort(sb)]);
+                       base = &gd.bases[baseID];
+                       employee = &(gd.employees[type][MSG_ReadShort(sb)]);
+                       HOS_AddToEmployeeList(base, employee);
                }
-#endif
        }
        return qtrue;
 }