diff options
-rw-r--r-- | src/game/bg_misc.c | 493 | ||||
-rw-r--r-- | src/ui/ui_main.c | 2 | ||||
-rw-r--r-- | src/ui/ui_shared.c | 18 |
3 files changed, 256 insertions, 257 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index eaffd383..e3bba6e8 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1279,7 +1279,7 @@ classAttributes_t bg_classList[ ] = { { PCL_A_B_BASE, //int classnum; - "Builder", //char *className; + "builder", //char *className; "Builder", //char *humanName; "lucy", //char *modelname; 1.0f, //float modelScale; @@ -1308,7 +1308,7 @@ classAttributes_t bg_classList[ ] = }, { PCL_A_B_LEV1, //int classnum; - "BuilderLevel1", //char *classname; + "builderupg", //char *classname; "Advanced Builder", //char *humanname; "lucy", //char *modelname; 1.0f, //float modelScale; @@ -1336,265 +1336,268 @@ classAttributes_t bg_classList[ ] = 100 //int value; }, { - PCL_A_O_BASE, //int classnum; - "Offensive", //char *classname; - "Offensive", //char *humanname; - "klesk", //char *modelname; - 0.5f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -15, -15, -15 }, //vec3_t mins; - { 15, 15, 15 }, //vec3_t maxs; - { 15, 15, 15 }, //vec3_t crouchmaxs; - { -15, -15, -4 }, //vec3_t deadmins; - { 15, 15, 4 }, //vec3_t deadmaxs; - 0, 0, //int viewheight, crouchviewheight; - 25, //int health; - 5, //int regenRate; - SCA_WALLCLIMBER|SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS|SCA_ALIENSENSE, //int abilities; - WP_VENOM, //weapon_t startWeapon - 0.0f, //float buildDist; - 140, //int fov; - 0.0f, //float bob; - 25, //int steptime; - 1.5f, //float speed; - 5.0f, //float sticky; - { PCL_A_O_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_BASE, //int classnum; + "soldier", //char *classname; + "Soldier", //char *humanname; + "klesk", //char *modelname; + 0.5f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -15, -15, -15 }, //vec3_t mins; + { 15, 15, 15 }, //vec3_t maxs; + { 15, 15, 15 }, //vec3_t crouchmaxs; + { -15, -15, -4 }, //vec3_t deadmins; + { 15, 15, 4 }, //vec3_t deadmaxs; + 0, 0, //int viewheight, crouchviewheight; + 25, //int health; + 5, //int regenRate; + SCA_WALLCLIMBER|SCA_CANJUMP|SCA_NOWEAPONDRIFT| + SCA_FOVWARPS|SCA_ALIENSENSE, //int abilities; + WP_VENOM, //weapon_t startWeapon + 0.0f, //float buildDist; + 140, //int fov; + 0.0f, //float bob; + 25, //int steptime; + 1.5f, //float speed; + 5.0f, //float sticky; + { PCL_A_O_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV1, //int classnum; - "OffensiveLevel1", //char *classname; - "Offensive Level 1", //char *humanname; - "anarki", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -24, -24, -24 }, //vec3_t mins; - { 24, 24, 24 }, //vec3_t maxs; - { 24, 24, 24 }, //vec3_t crouchmaxs; - { -24, -24, -4 }, //vec3_t deadmins; - { 24, 24, 4 }, //vec3_t deadmaxs; - 6, 6, //int viewheight, crouchviewheight; - 50, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_GRAB_CLAW, //weapon_t startWeapon - 0.0f, //float buildDist; - 120, //int fov; - 0.001f, //float bob; - 25, //int steptime; - 1.5f, //float speed; - 4.0f, //float sticky; - { PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV1, //int classnum; + "dragoon", //char *classname; + "Dragoon", //char *humanname; + "bones", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -24, -24, -24 }, //vec3_t mins; + { 24, 24, 24 }, //vec3_t maxs; + { 24, 24, 24 }, //vec3_t crouchmaxs; + { -24, -24, -4 }, //vec3_t deadmins; + { 24, 24, 4 }, //vec3_t deadmaxs; + 6, 6, //int viewheight, crouchviewheight; + 50, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; + WP_POUNCE, //weapon_t startWeapon + 0.0f, //float buildDist; + 120, //int fov; + 0.0005f, //float bob; + 25, //int steptime; + 1.5f, //float speed; + 3.0f, //float sticky; + { PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV1_UPG, //int classnum; - "OffensiveLevel1-Upgrade", //char *classname; - "Offensive Level 1 Upgrade", //char *humanname; - "anarki", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -24, -24, -24 }, //vec3_t mins; - { 24, 24, 24 }, //vec3_t maxs; - { 24, 24, 24 }, //vec3_t crouchmaxs; - { -24, -24, -4 }, //vec3_t deadmins; - { 24, 24, 4 }, //vec3_t deadmaxs; - 6, 6, //int viewheight, crouchviewheight; - 50, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_GRAB_CLAW_UPG, //weapon_t startWeapon - 0.0f, //float buildDist; - 120, //int fov; - 0.001f, //float bob; - 25, //int steptime; - 1.5f, //float speed; - 4.0f, //float sticky; - { PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV1_UPG, //int classnum; + "dragoonupg", //char *classname; + "Dragoon Upgrade", //char *humanname; + "bones", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -24, -24, -24 }, //vec3_t mins; + { 24, 24, 24 }, //vec3_t maxs; + { 24, 24, 24 }, //vec3_t crouchmaxs; + { -24, -24, -4 }, //vec3_t deadmins; + { 24, 24, 4 }, //vec3_t deadmaxs; + 6, 6, //int viewheight, crouchviewheight; + 50, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; + WP_POUNCE_UPG, //weapon_t startWeapon + 0.0f, //float buildDist; + 120, //int fov; + 0.0005f, //float bob; + 25, //int steptime; + 1.5f, //float speed; + 3.0f, //float sticky; + { PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV2, //int classnum; - "OffensiveLevel2", //char *classname; - "Offensive Level 2", //char *humanname; - "bones", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -24, -24, -24 }, //vec3_t mins; - { 24, 24, 24 }, //vec3_t maxs; - { 24, 24, 24 }, //vec3_t crouchmaxs; - { -24, -24, -4 }, //vec3_t deadmins; - { 24, 24, 4 }, //vec3_t deadmaxs; - 6, 6, //int viewheight, crouchviewheight; - 50, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_POUNCE, //weapon_t startWeapon - 0.0f, //float buildDist; - 120, //int fov; - 0.0005f, //float bob; - 25, //int steptime; - 1.5f, //float speed; - 3.0f, //float sticky; - { PCL_A_O_LEV3, PCL_A_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV2, //int classnum; + "hydra", //char *classname; + "Hydra", //char *humanname; + "anarki", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -24, -24, -24 }, //vec3_t mins; + { 24, 24, 24 }, //vec3_t maxs; + { 24, 24, 24 }, //vec3_t crouchmaxs; + { -24, -24, -4 }, //vec3_t deadmins; + { 24, 24, 4 }, //vec3_t deadmaxs; + 6, 6, //int viewheight, crouchviewheight; + 50, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT| + SCA_FOVWARPS|SCA_WALLCLIMBER, //int abilities; + WP_GRAB_CLAW, //weapon_t startWeapon + 0.0f, //float buildDist; + 120, //int fov; + 0.001f, //float bob; + 25, //int steptime; + 1.5f, //float speed; + 4.0f, //float sticky; + { PCL_A_O_LEV3, PCL_A_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV2_UPG, //int classnum; - "OffensiveLevel2-Upgrade", //char *classname; - "Offensive Level 2 Upgrade", //char *humanname; - "bones", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -24, -24, -24 }, //vec3_t mins; - { 24, 24, 24 }, //vec3_t maxs; - { 24, 24, 24 }, //vec3_t crouchmaxs; - { -24, -24, -4 }, //vec3_t deadmins; - { 24, 24, 4 }, //vec3_t deadmaxs; - 6, 6, //int viewheight, crouchviewheight; - 50, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_POUNCE_UPG, //weapon_t startWeapon - 0.0f, //float buildDist; - 120, //int fov; - 0.0005f, //float bob; - 25, //int steptime; - 1.5f, //float speed; - 3.0f, //float sticky; - { PCL_A_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV2_UPG, //int classnum; + "hydraupg", //char *classname; + "Hydra Upgrade", //char *humanname; + "anarki", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -24, -24, -24 }, //vec3_t mins; + { 24, 24, 24 }, //vec3_t maxs; + { 24, 24, 24 }, //vec3_t crouchmaxs; + { -24, -24, -4 }, //vec3_t deadmins; + { 24, 24, 4 }, //vec3_t deadmaxs; + 6, 6, //int viewheight, crouchviewheight; + 50, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT| + SCA_FOVWARPS|SCA_WALLCLIMBER, //int abilities; + WP_GRAB_CLAW_UPG, //weapon_t startWeapon + 0.0f, //float buildDist; + 120, //int fov; + 0.001f, //float bob; + 25, //int steptime; + 1.5f, //float speed; + 4.0f, //float sticky; + { PCL_A_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV3, //int classnum; - "OffensiveLevel3", //char *classname; - "Offensive Level 3", //char *humanname; - "orbb", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -15, -15, -15 }, //vec3_t mins; - { 15, 15, 15 }, //vec3_t maxs; - { 15, 15, 15 }, //vec3_t crouchmaxs; - { -15, -15, -4 }, //vec3_t deadmins; - { 15, 15, 4 }, //vec3_t deadmaxs; - 4, 4, //int viewheight, crouchviewheight; - 100, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_AREA_ZAP, //weapon_t startWeapon - 0.0f, //float buildDist; - 130, //int fov; - 0.0f, //float bob; - 60, //int steptime; - 1.3f, //float speed; - 5.0f, //float sticky; - { PCL_A_O_LEV4, PCL_A_O_LEV3_UPG, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV3, //int classnum; + "chimera", //char *classname; + "Chimera", //char *humanname; + "orbb", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -15, -15, -15 }, //vec3_t mins; + { 15, 15, 15 }, //vec3_t maxs; + { 15, 15, 15 }, //vec3_t crouchmaxs; + { -15, -15, -4 }, //vec3_t deadmins; + { 15, 15, 4 }, //vec3_t deadmaxs; + 4, 4, //int viewheight, crouchviewheight; + 100, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; + WP_AREA_ZAP, //weapon_t startWeapon + 0.0f, //float buildDist; + 130, //int fov; + 0.0f, //float bob; + 60, //int steptime; + 1.3f, //float speed; + 5.0f, //float sticky; + { PCL_A_O_LEV4, PCL_A_O_LEV3_UPG, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV3_UPG, //int classnum; - "OffensiveLevel3-Upgrade", //char *classname; - "Offensive Level 3 Upgrade", //char *humanname; - "orbb", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -15, -15, -15 }, //vec3_t mins; - { 15, 15, 15 }, //vec3_t maxs; - { 15, 15, 15 }, //vec3_t crouchmaxs; - { -15, -15, -4 }, //vec3_t deadmins; - { 15, 15, 4 }, //vec3_t deadmaxs; - 4, 4, //int viewheight, crouchviewheight; - 100, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_DIRECT_ZAP, //weapon_t startWeapon - 0.0f, //float buildDist; - 130, //int fov; - 0.0f, //float bob; - 60, //int steptime; - 1.3f, //float speed; - 5.0f, //float sticky; - { PCL_A_O_LEV4, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV3_UPG, //int classnum; + "chimeraupg", //char *classname; + "Chimera Upgrade", //char *humanname; + "orbb", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -15, -15, -15 }, //vec3_t mins; + { 15, 15, 15 }, //vec3_t maxs; + { 15, 15, 15 }, //vec3_t crouchmaxs; + { -15, -15, -4 }, //vec3_t deadmins; + { 15, 15, 4 }, //vec3_t deadmaxs; + 4, 4, //int viewheight, crouchviewheight; + 100, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; + WP_DIRECT_ZAP, //weapon_t startWeapon + 0.0f, //float buildDist; + 130, //int fov; + 0.0f, //float bob; + 60, //int steptime; + 1.3f, //float speed; + 5.0f, //float sticky; + { PCL_A_O_LEV4, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_A_O_LEV4, //int classnum; - "OffensiveLevel4", //char *classname; - "Offensive Level 4", //char *humanname; - "xaero", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "alien_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -15, -15, -15 }, //vec3_t mins; - { 15, 15, 15 }, //vec3_t maxs; - { 15, 15, 15 }, //vec3_t crouchmaxs; - { -15, -15, -4 }, //vec3_t deadmins; - { 15, 15, 4 }, //vec3_t deadmaxs; - 4, 4, //int viewheight, crouchviewheight; - 100, //int health; - 5, //int regenRate; - SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; - WP_GROUND_POUND, //weapon_t startWeapon - 0.0f, //float buildDist; - 130, //int fov; - 0.0f, //float bob; - 60, //int steptime; - 1.3f, //float speed; - 5.0f, //float sticky; - { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 3000, //int timetoevolve; - 100 //int value; + PCL_A_O_LEV4, //int classnum; + "bigmofo", //char *classname; + "Big Mofo", //char *humanname; + "xaero", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "alien_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -15, -15, -15 }, //vec3_t mins; + { 15, 15, 15 }, //vec3_t maxs; + { 15, 15, 15 }, //vec3_t crouchmaxs; + { -15, -15, -4 }, //vec3_t deadmins; + { 15, 15, 4 }, //vec3_t deadmaxs; + 4, 4, //int viewheight, crouchviewheight; + 100, //int health; + 5, //int regenRate; + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities; + WP_GROUND_POUND, //weapon_t startWeapon + 0.0f, //float buildDist; + 130, //int fov; + 0.0f, //float bob; + 60, //int steptime; + 1.3f, //float speed; + 5.0f, //float sticky; + { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 3000, //int timetoevolve; + 100 //int value; }, { - PCL_H_BASE, //int classnum; - "Human", //char *classname; - "Human", //char *humanname; - "sarge", //char *modelname; - 1.0f, //float modelScale; - "default", //char *skinname; - "human_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages - { -15, -15, -24 }, //vec3_t mins; - { 15, 15, 32 }, //vec3_t maxs; - { 15, 15, 16 }, //vec3_t crouchmaxs; - { -15, -15, -4 }, //vec3_t deadmins; - { 15, 15, 4 }, //vec3_t deadmaxs; - 26, 12, //int viewheight, crouchviewheight; - 100, //int health; - 0, //int regenRate; - SCA_TAKESFALLDAMAGE|SCA_CANJUMP, //int abilities; - WP_NONE, //special-cased in g_client.c //weapon_t startWeapon - 110.0f, //float buildDist; - 90, //int fov; - 0.002f, //float bob; - 200, //int steptime; - 1.0f, //float speed; - 1.0f, //float sticky; - { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; - 0, //int timetoevolve; - 0 //int value; + PCL_H_BASE, //int classnum; + "human", //char *classname; + "Human", //char *humanname; + "sarge", //char *modelname; + 1.0f, //float modelScale; + "default", //char *skinname; + "human_hud", //char *hudname; + ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + { -15, -15, -24 }, //vec3_t mins; + { 15, 15, 32 }, //vec3_t maxs; + { 15, 15, 16 }, //vec3_t crouchmaxs; + { -15, -15, -4 }, //vec3_t deadmins; + { 15, 15, 4 }, //vec3_t deadmaxs; + 26, 12, //int viewheight, crouchviewheight; + 100, //int health; + 0, //int regenRate; + SCA_TAKESFALLDAMAGE|SCA_CANJUMP, //int abilities; + WP_NONE, //special-cased in g_client.c //weapon_t startWeapon + 110.0f, //float buildDist; + 90, //int fov; + 0.002f, //float bob; + 200, //int steptime; + 1.0f, //float speed; + 1.0f, //float sticky; + { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ]; + 0, //int timetoevolve; + 0 //int value; } }; diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 35773b07..63179021 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -3502,7 +3502,7 @@ static void UI_LoadTremAlienUpgrades( ) if( BG_ClassCanEvolveFromTo( class, i, credits, 0 ) && BG_FindStagesForClass( i, stage ) ) { - uiInfo.tremAlienUpgradeList[ j ].text = String_Alloc( BG_FindNameForClassNum( i ) ); + uiInfo.tremAlienUpgradeList[ j ].text = String_Alloc( BG_FindHumanNameForClassNum( i ) ); uiInfo.tremAlienUpgradeList[ j ].cmd = String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( i ) ) ); uiInfo.tremAlienUpgradeList[ j ].infopane = diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 4db016a7..e110e8de 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -2818,7 +2818,7 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) char text[ 1024 ]; const char *p, *textPtr, *newLinePtr; char buff[ 1024 ]; - int len, textWidth, newLine, newLineWidth; + int len, textWidth, newLine; vec4_t color; int lines = 0; @@ -2844,7 +2844,6 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) len = 0; buff[ 0 ] = '\0'; newLine = 0; - newLineWidth = 0; p = textPtr; while( p ) @@ -2855,7 +2854,6 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) { newLine = len; newLinePtr = p + 1; - newLineWidth = textWidth; } //TA: forceably split lines that are too long (where normal splitage has failed) @@ -2863,7 +2861,6 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) { newLine = len; newLinePtr = p; - newLineWidth = textWidth; } if( ( newLine && textWidth > item->window.rect.w ) || *p == '\n' || *p == '\0' ) @@ -2881,7 +2878,6 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) p = newLinePtr; len = 0; newLine = 0; - newLineWidth = 0; continue; } @@ -2933,14 +2929,14 @@ void Item_Text_AutoWrapped_Paint( itemDef_t *item ) newLineWidth = 0; p = textPtr; - skipLines = -1; totalLines = Item_Text_AutoWrapped_Lines( item ); - do - { - skipLines++; - totalY = ( totalLines - skipLines ) * ( height + 5 ); - } while( totalY > item->window.rect.h ); + totalY = totalLines * ( height + 5 ); + + if( totalY - item->window.rect.h > 0.0f ) + skipLines = (int)( totalY / ( (float)height + 5.0f ) ); + else + skipLines = 0; while( p ) { |