equal
deleted
inserted
replaced
121 NSDictionary *ammoData = [[NSDictionary alloc] initWithContentsOfFile:weaponPath]; |
121 NSDictionary *ammoData = [[NSDictionary alloc] initWithContentsOfFile:weaponPath]; |
122 [weaponPath release]; |
122 [weaponPath release]; |
123 NSString *update = @""; |
123 NSString *update = @""; |
124 |
124 |
125 // if we're loading an older version of ammos fill the engine message with 0s |
125 // if we're loading an older version of ammos fill the engine message with 0s |
126 int diff = CURRENT_AMMOSIZE - [[ammoData objectForKey:@"version"] intValue]; |
126 int diff = HW_getNumberOfWeapons() - [[ammoData objectForKey:@"version"] intValue]; |
127 if (diff != 0) |
127 if (diff != 0) |
128 update = [NSString stringWithCharacters:(const unichar*)"0000000000000000000000000000000000" length:diff]; |
128 update = [NSString stringWithCharacters:(const unichar*)"0000000000000000000000000000000000" length:diff]; |
129 |
129 |
130 NSString *ammloadt = [[NSString alloc] initWithFormat:@"eammloadt %@%@", [ammoData objectForKey:@"ammostore_initialqt"], update]; |
130 NSString *ammloadt = [[NSString alloc] initWithFormat:@"eammloadt %@%@", [ammoData objectForKey:@"ammostore_initialqt"], update]; |
131 [self sendToEngine: ammloadt]; |
131 [self sendToEngine: ammloadt]; |