- g_shared refactored

This commit is contained in:
Christoph Oelckers 2016-01-19 13:26:05 +01:00
commit 27aeb6a656
15 changed files with 111 additions and 122 deletions

View file

@ -36,17 +36,14 @@ void P_SpawnDirt (AActor *actor, fixed_t radius)
AActor *mo;
angle_t angle;
angle = pr_dirt()<<5; // <<24 >>19
x = actor->x + FixedMul(radius,finecosine[angle]);
y = actor->y + FixedMul(radius,finesine[angle]);
z = actor->z + (pr_dirt()<<9) + FRACUNIT;
fixedvec3 pos = actor->Vec3Angle(radius, pr_dirt() << 24, (pr_dirt() << 9) + FRACUNIT);
char fmt[8];
mysnprintf(fmt, countof(fmt), "Dirt%d", 1 + pr_dirt()%6);
dtype = PClass::FindClass(fmt);
if (dtype)
{
mo = Spawn (dtype, x, y, z, ALLOW_REPLACE);
mo = Spawn (dtype, pos, ALLOW_REPLACE);
if (mo)
{
mo->velz = pr_dirt()<<10;