Skip to content

Commit

Permalink
Corrected positioning of weapons when player image is flipped.
Browse files Browse the repository at this point in the history
Player must be drawn in a larger region in order to show the whole
weapon graphic, now that placement is corrected. Increased size of
player region.
  • Loading branch information
greywhind committed Nov 16, 2013
1 parent d493420 commit a708c11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions data/weapons/standard
Expand Up @@ -7,8 +7,8 @@
penetrate_players=0.75
penetrate_walls=0.0
max_penetration=3
normal=13,36:-15:front:back:rifle_noshot.png;4,20:-15:back:back:rifle_noshot.png
firing=13,36:-15:front:back:rifle_shot.png;4,20:-15:back:back:rifle_shot.png
normal=13,36:-15:front:back:rifle_noshot.png;-15,34:-15:back:front:rifle_noshot.png
firing=13,36:-15:front:back:rifle_shot.png;-15,34:-15:back:front:rifle_shot.png
firing_line_emitter_image_red=red_particle.png
firing_line_emitter_image_blue=blue_particle.png
firing_line_emitter=particle_speed=10.0|speed_variance=0.05|spawn_per_second=1000.0|spawn_variance=1.0|lifetime_millis=250|lifetime_variance=50|rotation_variance=6.28318|max_spawn=200|emitter_stop_spawning_millis=-1|emitter_lifetime_millis=-1|
Expand All @@ -22,8 +22,8 @@
degradation=0.01
cooldown=600
recoil=1.5
normal=12,55:-15:front:back:sgun_noshot.png;5,20:-15:back:back:sgun_noshot.png
firing=12,55:-15:front:back:sgun_shot.png;5,20:-15:back:back:sgun_shot.png
normal=12,55:-15:front:back:sgun_noshot.png;-17,59:-15:back:front:sgun_noshot.png
firing=12,55:-15:front:back:sgun_shot.png;-17,59:-15:back:front:sgun_shot.png
firing_radial_emitter_image_red=shot_red.png
firing_radial_emitter_image_blue=shot.png
firing_radial_emitter=particle_speed=1000.0|speed_variance=50.0|spawn_per_second=1000.0|spawn_variance=100.0|lifetime_millis=300|lifetime_variance=50|rotation_variance=0.3|max_spawn=5|emitter_stop_spawning_millis=-1|emitter_lifetime_millis=-1|
Expand All @@ -46,8 +46,8 @@
freeze=1000
cooldown=2000
recoil=4.0
normal=15,32:-15:front:front:cannon_back.png;15,32:-15:front:back:cannon_front.png;10,-1:-15:back:front:cannon_back.png;10,-1:-15:back:back:cannon_front.png
firing=15,32:-15:front:front:cannon_back.png;15,32:-15:front:back:cannon_front_shot.png;10,-1:-15:back:front:cannon_back.png;10,-1:-15:back:back:cannon_front_shot.png
normal=15,32:-15:front:front:cannon_back.png;15,32:-15:front:back:cannon_front.png;-13,32:-15:back:back:cannon_back.png;-13,32:-15:back:front:cannon_front.png
firing=15,32:-15:front:front:cannon_back.png;15,32:-15:front:back:cannon_front_shot.png;-13,32:-15:back:back:cannon_back.png;-13,32:-15:back:front:cannon_front_shot.png
pivot=0,0;
shape=poly:1000,-100;1000,100;0,0;
# move=false; # not yet implemented
Expand Down
5 changes: 3 additions & 2 deletions gui/GraphicalPlayer.cpp
Expand Up @@ -48,8 +48,8 @@ GraphicalPlayer::GraphicalPlayer(const char* name, uint32_t id, char team, Resou
Sprite front_leg(cache->get<Image>(color + "_frontleg.png"));
Sprite back_leg(cache->get<Image>(color + "_backleg.png"));

m_graphic_root.set_width(128);
m_graphic_root.set_height(128);
m_graphic_root.set_width(166);
m_graphic_root.set_height(166);
m_graphic_root.build_texture(cache);
m_root_bone.set_x(m_graphic_root.get_width()*0.5);
m_root_bone.set_y(m_graphic_root.get_height()*0.5);
Expand Down Expand Up @@ -252,5 +252,6 @@ Graphic* GraphicalPlayer::get_curr_visible_weapon_graphic() {
return get_weapon_graphic(PART_BACK_HAND|PART_FRONT_ARM|PART_UNFIRED);
} else {
DEBUG("No part found.");
return NULL;
}
}

0 comments on commit a708c11

Please sign in to comment.