More reasonable default vertical ranges. Replace flat 1000 with (height * 2), or (vertical res / 2) if model doesn't have a height.
@@ -10126,9 +10126,32 @@ s_model *load_cached_model(char *name, char *owner, char unload)
newanim->range.z.min = (int) - newchar->grabdistance / 3; //zmin
newanim->range.z.max = (int)newchar->grabdistance / 3; //zmax
newanim->range.y.min = T_MIN_BASEMAP; //amin
- newanim->range.y.max = 1000; //amax
+
+ // Vertical range default.
+ // If we have a model height, then double it.
+ // Otherwise use half the vertical screen size.
+ if (newchar->size.y)
+ {
+ newanim->range.y.max = newchar->size.y * 2;
+ }
+ else
+ {
+ newanim->range.y.max = videomodes.vRes / 2;
+ }
+
newanim->range.base.min = T_MIN_BASEMAP; //Base min.
- newanim->range.base.max = 1000; //Base max.
+
+ // Base range default.
+ // Same logic as veritcal range default.
+ if (newchar->size.y)
+ {
+ newanim->range.base.max = newchar->size.y * 2;
+ }
+ else
+ {
+ newanim->range.base.max = videomodes.vRes / 2;
+ }
+
newanim->energycost = NULL;
newanim->chargetime = 2; // Default for backwards compatibility
newanim->projectile.shootframe = -1;
