From b1b3fbbc20580d8930061d1309907e286d636a68 Mon Sep 17 00:00:00 2001 From: lieuwe Date: Fri, 29 Jul 2011 22:24:41 +0800 Subject: [PATCH] added some metl->wire interaction, still working on wire->metl --- src/elements/dlay.c | 4 ++++ src/elements/wire.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/elements/dlay.c b/src/elements/dlay.c index 2a248ca62..9e88320a9 100644 --- a/src/elements/dlay.c +++ b/src/elements/dlay.c @@ -42,6 +42,10 @@ int update_DLAY(UPDATE_FUNC_ARGS) { { create_part(-1, x+rx, y+ry, PT_SPRK); } + else if((r&0xFF)==PT_WIRE && oldl==1) + { + parts[r>>8].ctype=1; + } } //} return 0; diff --git a/src/elements/wire.c b/src/elements/wire.c index abdb982c1..1b5d1509f 100644 --- a/src/elements/wire.c +++ b/src/elements/wire.c @@ -22,7 +22,8 @@ int update_WIRE(UPDATE_FUNC_ARGS) { if(x+rx>=0 && y+ry>0 && x+rx>8].ctype=1; return 0;} + if((r&0xFF)==PT_NSCN && parts[s>>8].tmp==1){create_part(-1, x+rx, y+ry, PT_SPRK);} + if((r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN){parts[s>>8].ctype=1; return 0;} if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1){count++;} } }