Correct the MD16 writing code.

Forgot to test it :P
This commit is contained in:
Bill Currie 2012-04-15 09:34:16 +09:00
parent ab4aec47a7
commit d3af0b2357

View file

@ -194,10 +194,10 @@ class MDL:
return self
def write(self, mdl, high=True):
if mdl.ident == 'MD16' and high:
r = tuple(map(lambda a: a >> 8, self.verts[i].r))
r = tuple(map(lambda a: a >> 8, self.r))
else:
r = tuple(map(lambda a: a & 255, self.verts[i].r))
mdl.write_byte(self.r)
r = tuple(map(lambda a: a & 255, self.r))
mdl.write_byte(r)
mdl.write_byte(self.ni)
def scale(self, mdl):
self.r = tuple(map(lambda x, s, t: int((x - t) / s),