This repository has been archived on 2023-06-17. You can view files and clone it, but cannot push or open issues/pull-requests.
2018-08-08 21:02:47 -07:00
|
|
|
// Copyright © 2016-2017 Graham Sanderson, all rights reserved.
|
|
|
|
#include "lith_upgrades_common.h"
|
|
|
|
|
|
|
|
// Extern Functions ----------------------------------------------------------|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Activate
|
|
|
|
//
|
|
|
|
void Upgr_CyberLegs_Activate(struct player *p, upgrade_t *upgr)
|
|
|
|
{
|
|
|
|
p->speedmul += 0.2;
|
|
|
|
p->jumpboost += 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Deactivate
|
|
|
|
//
|
|
|
|
void Upgr_CyberLegs_Deactivate(struct player *p, upgrade_t *upgr)
|
|
|
|
{
|
|
|
|
p->speedmul -= 0.2;
|
|
|
|
p->jumpboost -= 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Update
|
|
|
|
//
|
2018-08-09 21:27:27 -07:00
|
|
|
script void Upgr_CyberLegs_Update(struct player *p, upgrade_t *upgr)
|
2018-08-08 21:02:47 -07:00
|
|
|
{
|
|
|
|
fixed absvel = absk(p->old.velz) * 10.0k;
|
|
|
|
|
|
|
|
if(p->velz == 0 && absvel > 160)
|
|
|
|
{
|
|
|
|
for(fixed i = absvel; i >= 100; i -= 100)
|
|
|
|
{
|
|
|
|
int tid;
|
|
|
|
ACS_SpawnForced("Lith_ExplodoBoots", p->x, p->y, p->z, tid = ACS_UniqueTID());
|
|
|
|
ACS_SetActivator(tid);
|
|
|
|
ACS_SetPointer(AAPTR_TARGET, p->tid);
|
|
|
|
p->setActivator();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|
|
|
|
|