mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
nilrider:: planning:: insert command now lets to drag to set vel
This commit is contained in:
parent
a5313d24c4
commit
523e000664
@ -269,14 +269,20 @@ bool level::handle_planning(int sym, int uni) {
|
||||
return false;
|
||||
}
|
||||
case 'i': {
|
||||
if(uni == '-') {
|
||||
if(uni == '-' && !holdmouse) {
|
||||
planpoint pt(C0, C0);
|
||||
pt.at = get_spline(closest_t);
|
||||
pt.vel = (get_spline(closest_t + 1e-3) - pt.at) / 1e-3;
|
||||
pt.vel = hpxy(0, 0);
|
||||
plan.insert(plan.begin() + int(ceil(closest_t)), pt);
|
||||
move_id = int(ceil(closest_t));
|
||||
holdmouse = true;
|
||||
clean_history_to(int(closest_t));
|
||||
return true;
|
||||
}
|
||||
else if(uni == '-' && holdmouse) {
|
||||
plan[move_id].vel = mousept - plan[move_id].at;
|
||||
clean_history_to(move_id - 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user